From df2b0b21d55389f99724df89ac60ef3fe82ad57f Mon Sep 17 00:00:00 2001 From: Dinis Vieira Date: Mon, 20 Nov 2023 22:07:40 +0000 Subject: [PATCH] PM-3350 Added workaround for iOS Avatar icon again. --- src/Core/Controls/AvatarImageSource.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/Core/Controls/AvatarImageSource.cs b/src/Core/Controls/AvatarImageSource.cs index 6ffbb1167..c20d61117 100644 --- a/src/Core/Controls/AvatarImageSource.cs +++ b/src/Core/Controls/AvatarImageSource.cs @@ -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,