mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-04 18:26:39 +02:00
[Settings] Fix reacting to theme change (#30326)
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user