Skip to content

Commit dd68273

Browse files
authored
Fix for issue 4507 - Buttons in dark theme
1 parent fe7ea5d commit dd68273

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/UniGetUI/MainWindow.xaml.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ public MainWindow()
6060
ExtendsContentIntoTitleBar = true;
6161
AppWindow.TitleBar.PreferredHeightOption = TitleBarHeightOption.Tall;
6262
SetTitleBar(MainContentGrid);
63+
MainContentGrid.ActualThemeChanged += (_, _) => ApplyTitleBarButtonColors();
6364
AppWindow.SetIcon(
6465
Path.Join(CoreData.UniGetUIExecutableDirectory, "Assets", "Images", "icon.ico")
6566
);
@@ -726,6 +727,11 @@ public void ApplyTheme()
726727
MainContentGrid.RequestedTheme = ElementTheme.Default;
727728
}
728729

730+
ApplyTitleBarButtonColors();
731+
}
732+
733+
private void ApplyTitleBarButtonColors()
734+
{
729735
if (AppWindowTitleBar.IsCustomizationSupported())
730736
{
731737
if (MainApp.Instance.ThemeListener.CurrentTheme == ApplicationTheme.Light)

0 commit comments

Comments
 (0)