[Settings] Fix reacting to theme change (#30326)

This commit is contained in:
Stefan Markovic 2023-12-11 16:44:53 +01:00 committed by GitHub
parent f30438b959
commit 93a422ca9b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -294,8 +294,6 @@ namespace Microsoft.PowerToys.Settings.UI
ThemeHelpers.SetImmersiveDarkMode(hWnd, isDark);
}
SetContentTheme(isDark);
if (SelectedTheme() == ElementTheme.Default)
{
themeListener = new ThemeListener();
@ -342,18 +340,6 @@ namespace Microsoft.PowerToys.Settings.UI
return 0;
}
public static void SetContentTheme(bool isDark)
{
if (isDark)
{
App.Current.RequestedTheme = ApplicationTheme.Dark;
}
else
{
App.Current.RequestedTheme = ApplicationTheme.Light;
}
}
private static ISettingsUtils settingsUtils = new SettingsUtils();
private static MainWindow settingsWindow;