mirror of
https://github.com/knah/VRCMelonAssistant.git
synced 2024-06-28 02:50:28 +12:00
Fix current theme not being selected in dropdown
This commit is contained in:
parent
23a94aa36c
commit
1c25ceb0c7
|
@ -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)
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue