Skip to content

Commit

Permalink
Fixed an issue with nav bar when switching theme (#353)
Browse files Browse the repository at this point in the history
  • Loading branch information
lpeyr committed Dec 10, 2023
1 parent 92a46ee commit 0a05756
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ColorPicker/Classes/Global.cs
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ public static class Global
}
};

internal static Action RefreshButton { get; set; }

internal static string SynethiaPath => $@"{FileSys.AppDataPath}\Léo Corporation\ColorPicker Max\SynethiaConfig.json";
internal static string BookmarksPath => $@"{FileSys.AppDataPath}\Léo Corporation\ColorPicker Max\Bookmarks.xml";
internal static string SettingsPath => $@"{FileSys.AppDataPath}\Léo Corporation\ColorPicker Max\Settings.xml";
Expand Down Expand Up @@ -284,6 +286,7 @@ public static void ChangeTheme(bool reload = false)
ChromaticWheelPage.CheckButton(ChromaticWheelPage.CheckedButton);
HarmoniesPage.CheckButton(HarmoniesPage.SelectedColorBtn);
PalettePage.CheckButton(PalettePage.SelectedColorBtn);
RefreshButton();
}

public static bool IsSystemThemeDark()
Expand Down
1 change: 1 addition & 0 deletions ColorPicker/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ public MainWindow()
{
InitializeComponent();
InitUI();
Global.RefreshButton = () => SettingsPageBtn.Background = Global.GetColorFromResource("Background1");
GC.Collect();
}

Expand Down

0 comments on commit 0a05756

Please sign in to comment.