Skip to content

Commit

Permalink
fix: macOS uses templated icons and need to be colored with black
Browse files Browse the repository at this point in the history
  • Loading branch information
timschneeb committed Jun 20, 2024
1 parent 720af54 commit 7021aca
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions GalaxyBudsClient/Utils/Interface/WindowIconRenderer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,11 @@ private static WindowIcon MakeFromBatteryLevel(int level)
RequiresFullOpacityHandling = true
});

ctx.DrawGeometry(new SolidColorBrush(Settings.Data.AccentColor), new Pen(Brushes.Transparent, 0), textGeometry!);

if(PlatformUtils.IsOSX)
ctx.DrawGeometry(Brushes.Black, new Pen(Brushes.Transparent, 0), textGeometry!);
else
ctx.DrawGeometry(new SolidColorBrush(Settings.Data.AccentColor), new Pen(Brushes.Transparent, 0), textGeometry!);
}

return new WindowIcon(render);
Expand All @@ -104,4 +108,4 @@ private static Bitmap MakeDefaultBitmap()
var uri = $"{Program.AvaresUrl}/Resources/icon_{type}_tray.ico";
return new Bitmap(AssetLoader.Open(new Uri(uri)));
}
}
}

0 comments on commit 7021aca

Please sign in to comment.