Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
bdawg1989 committed Jan 8, 2024
2 parents d73e4f8 + bbaf82b commit 00793d5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion RaidCrawler.WinForms/SubForms/ConfigWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ private void ApplyTheme(string theme)

private void ThemeComboBox_SelectedIndexChanged(object sender, EventArgs e)
{
// Null check for safety
if (this.ThemeComboBox.SelectedItem == null) return;

string selectedTheme = this.ThemeComboBox.SelectedItem.ToString();
Expand All @@ -112,9 +113,11 @@ private void ThemeComboBox_SelectedIndexChanged(object sender, EventArgs e)
this.SetLightTheme();
}

this.c.Theme = selectedTheme;
// Save the selected theme to the configuration
this.c.Theme = selectedTheme; // Use the variable you have defined
SaveConfig();

// Invoke the ThemeChanged event with the correct variable
ThemeChanged?.Invoke(selectedTheme);
}

Expand Down

0 comments on commit 00793d5

Please sign in to comment.