1
0
mirror of https://github.com/bitwarden/mobile.git synced 2024-09-30 04:17:55 +02:00

PM-3350 Added workaround for iOS Avatar icon again.

This commit is contained in:
Dinis Vieira 2023-11-20 22:07:40 +00:00
parent e6b1bab860
commit df2b0b21d5
No known key found for this signature in database
GPG Key ID: 9389160FF6C295F3

View File

@ -68,6 +68,14 @@ namespace Bit.App.Controls
var textColor = CoreHelpers.TextColorFromBgColor(bgColor);
var size = 50;
//Workaround: [MAUI-Migration] There is currently a bug in MAUI where the actual size of the image is used instead of the size it should occupy in the Toolbar.
//This causes some issues with the position of the icon. As a workaround we make the icon smaller until this is fixed.
//Github issues: https://github.com/dotnet/maui/issues/12359 and https://github.com/dotnet/maui/pull/17120
if (DeviceInfo.Platform == DevicePlatform.iOS)
{
size = 20;
}
using (var bitmap = new SKBitmap(size * 2,
size * 2,
SKImageInfo.PlatformColorType,