From f89b98e7c799cdaf80751e2e7ee6da2c0a237cb5 Mon Sep 17 00:00:00 2001 From: punker76 Date: Fri, 30 Oct 2020 11:54:50 +0100 Subject: [PATCH] [PowerLauncher] Fix getting theme changed event --- src/modules/launcher/Wox.Plugin/ThemeManager.cs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/modules/launcher/Wox.Plugin/ThemeManager.cs b/src/modules/launcher/Wox.Plugin/ThemeManager.cs index e83a43c0f5..3118a17c3f 100644 --- a/src/modules/launcher/Wox.Plugin/ThemeManager.cs +++ b/src/modules/launcher/Wox.Plugin/ThemeManager.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation +// Copyright (c) Microsoft Corporation // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. @@ -61,9 +61,14 @@ namespace Wox.Plugin darkThemeUri, CustomLibraryThemeProvider.DefaultInstance)); - ResetTheme(); - ControlzEx.Theming.ThemeManager.Current.ThemeSyncMode = ControlzEx.Theming.ThemeSyncMode.SyncAll; ControlzEx.Theming.ThemeManager.Current.ThemeChanged += Current_ThemeChanged; + + // Currently we don't need to sync all, because the accent is not used + // If we want to sync all and use runtime generated themes, + // then it's necessary to have a "GeneratorParameters.json" and "Theme.Template.xaml". + ControlzEx.Theming.ThemeManager.Current.ThemeSyncMode = ControlzEx.Theming.ThemeSyncMode.SyncWithAppMode; + + ControlzEx.Theming.ThemeManager.Current.SyncTheme(); } public Theme GetCurrentTheme()