diff --git a/ModAssistant/Classes/Themes.cs b/ModAssistant/Classes/Themes.cs index 154e3f0..d8d485e 100644 --- a/ModAssistant/Classes/Themes.cs +++ b/ModAssistant/Classes/Themes.cs @@ -45,7 +45,10 @@ namespace ModAssistant //MessageBox.Show($"(DEBUG) Loaded {loadedThemes.Count - 2} themes from Themes folder."); } if (Options.Instance != null && Options.Instance.ApplicationThemeComboBox != null) + { Options.Instance.ApplicationThemeComboBox.ItemsSource = LoadedThemes; + Options.Instance.ApplicationThemeComboBox.SelectedIndex = LoadedThemes.IndexOf(LoadedTheme); + } } private static ResourceDictionary LoadTheme(string name, bool localUri = false) diff --git a/ModAssistant/MainWindow.xaml.cs b/ModAssistant/MainWindow.xaml.cs index a1881e1..9bdbe94 100644 --- a/ModAssistant/MainWindow.xaml.cs +++ b/ModAssistant/MainWindow.xaml.cs @@ -64,7 +64,8 @@ namespace ModAssistant try { Themes.ApplyTheme("Light", this); - }catch (ArgumentException) + } + catch (ArgumentException) { Themes.ApplyTheme("Light", this); MainText = "Theme not found, reverting to Light theme..."; @@ -124,6 +125,7 @@ namespace ModAssistant break; case "Options": Main.Content = Options.Instance; + Themes.LoadThemes(); break; default: Main.Content = Intro.Instance; @@ -191,6 +193,7 @@ namespace ModAssistant private void OptionsButton_Click(object sender, RoutedEventArgs e) { Main.Content = Options.Instance; + Themes.LoadThemes(); Properties.Settings.Default.LastTab = "Options"; Properties.Settings.Default.Save(); } diff --git a/ModAssistant/Pages/Options.xaml.cs b/ModAssistant/Pages/Options.xaml.cs index 14aac81..4fbb75b 100644 --- a/ModAssistant/Pages/Options.xaml.cs +++ b/ModAssistant/Pages/Options.xaml.cs @@ -54,12 +54,6 @@ namespace ModAssistant.Pages UpdateHandlerStatus(); this.DataContext = this; - - if (!DesignerProperties.GetIsInDesignMode(this)) - { - if (!Themes.LoadedThemes.Any()) Themes.LoadThemes(); - ApplicationThemeComboBox.SelectedValue = Themes.LoadedTheme; - } } public void UpdateHandlerStatus()