From 272197788b694890a37a88290e21b4a6d1f5b2ef Mon Sep 17 00:00:00 2001 From: Oren Nachman Date: Tue, 19 Jul 2022 10:48:13 -0700 Subject: [PATCH 1/2] Force reload theme resources when changing fonts etc in settings (#625, #637) This will mean that changing some settings will be a bit slower than before, especially when enabling blur which will reload resources twice but this is negligible and only hits in settings. --- Flow.Launcher.Core/Resource/Theme.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Flow.Launcher.Core/Resource/Theme.cs b/Flow.Launcher.Core/Resource/Theme.cs index 6561419a16b..4c1a88e2364 100644 --- a/Flow.Launcher.Core/Resource/Theme.cs +++ b/Flow.Launcher.Core/Resource/Theme.cs @@ -85,10 +85,13 @@ public bool ChangeTheme(string theme) Settings.Theme = theme; + // #625, #637 - reload all resources even if the theme itself hasn't changed in order to pickup changes + // to things like fonts + UpdateResourceDictionary(GetResourceDictionary()); + //always allow re-loading default theme, in case of failure of switching to a new theme from default theme if (_oldTheme != theme || theme == defaultTheme) { - UpdateResourceDictionary(GetResourceDictionary()); _oldTheme = Path.GetFileNameWithoutExtension(_oldResource.Source.AbsolutePath); } From 8498a15ff0b1989f977d0d442158a784c75fa037 Mon Sep 17 00:00:00 2001 From: Jeremy Wu Date: Thu, 28 Jul 2022 20:23:39 +1000 Subject: [PATCH 2/2] update comment --- Flow.Launcher.Core/Resource/Theme.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Flow.Launcher.Core/Resource/Theme.cs b/Flow.Launcher.Core/Resource/Theme.cs index 4c1a88e2364..21892303a90 100644 --- a/Flow.Launcher.Core/Resource/Theme.cs +++ b/Flow.Launcher.Core/Resource/Theme.cs @@ -85,7 +85,7 @@ public bool ChangeTheme(string theme) Settings.Theme = theme; - // #625, #637 - reload all resources even if the theme itself hasn't changed in order to pickup changes + // reload all resources even if the theme itself hasn't changed in order to pickup changes // to things like fonts UpdateResourceDictionary(GetResourceDictionary());