Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/UniGetUI/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,10 @@ public MainWindow()
ExtendsContentIntoTitleBar = true;
AppWindow.TitleBar.PreferredHeightOption = TitleBarHeightOption.Tall;
SetTitleBar(MainContentGrid);
MainContentGrid.ActualThemeChanged += (_, _) => ApplyTitleBarButtonColors();
// System theme changed at runtime: re-sync the cached theme, title bar and tray icon
MainContentGrid.ActualThemeChanged += (_, _) => { ApplyTheme(); UpdateSystemTrayStatus(); };
// Tray icon follows the system theme even when the app theme is fixed
MainApp.Instance.ThemeListener.ThemeChanged += (_) => DispatcherQueue.TryEnqueue(UpdateSystemTrayStatus);
AppWindow.SetIcon(
Path.Join(CoreData.UniGetUIExecutableDirectory, "Assets", "Images", "icon.ico")
);
Expand Down
Loading