mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-05 10:46:33 +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);
|
ThemeHelpers.SetImmersiveDarkMode(hWnd, isDark);
|
||||||
}
|
}
|
||||||
|
|
||||||
SetContentTheme(isDark);
|
|
||||||
|
|
||||||
if (SelectedTheme() == ElementTheme.Default)
|
if (SelectedTheme() == ElementTheme.Default)
|
||||||
{
|
{
|
||||||
themeListener = new ThemeListener();
|
themeListener = new ThemeListener();
|
||||||
@@ -342,18 +340,6 @@ namespace Microsoft.PowerToys.Settings.UI
|
|||||||
return 0;
|
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 ISettingsUtils settingsUtils = new SettingsUtils();
|
||||||
|
|
||||||
private static MainWindow settingsWindow;
|
private static MainWindow settingsWindow;
|
||||||
|
|||||||
Reference in New Issue
Block a user