mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-11-27 23:19:13 +08:00
[Settings] Fix reacting to theme change (#30326)
This commit is contained in:
parent
f30438b959
commit
93a422ca9b
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user