Skip to content

Commit

Permalink
fix: workaround for AcrylicBrush pink background on macOS/arm64
Browse files Browse the repository at this point in the history
  • Loading branch information
spouliot committed Jun 5, 2024
1 parent ef403a8 commit 739370b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Uno.UI/UI/Xaml/Media/AcrylicBrush/AcrylicBrush.skia.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

using System;
using System.IO;
using System.Runtime.InteropServices;
using Windows.UI;
using Microsoft.UI;
using Microsoft.UI.Composition;
Expand Down Expand Up @@ -76,12 +77,15 @@ internal override void OnPropertyChanged2(DependencyPropertyChangedEventArgs arg
}
}

// issue specific to macOSarm64 https://github.com/unoplatform/uno/issues/16853
static bool macOSarm64 = RuntimeInformation.IsOSPlatform(OSPlatform.OSX) && RuntimeInformation.ProcessArchitecture is Architecture.Arm64;

private void UpdateAcrylicBrush()
{
if (_isConnected)
{
// TODO: Currently we are force recreating the brush even if it exists because Composition animations aren't implemented yet
CreateAcrylicBrush(false /* useCrossFadeEffect */, true /* forceCreateAcrylicBrush */);
CreateAcrylicBrush(useCrossFadeEffect: false, forceCreateAcrylicBrush: !macOSarm64);
}
}

Expand Down

0 comments on commit 739370b

Please sign in to comment.