From 4df9c04702062a177a517bd1328ff547eb03a06b Mon Sep 17 00:00:00 2001 From: Jack251970 <1160210343@qq.com> Date: Thu, 24 Apr 2025 19:49:34 +0800 Subject: [PATCH] Update dynamic resource earilier --- Flow.Launcher/App.xaml.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Flow.Launcher/App.xaml.cs b/Flow.Launcher/App.xaml.cs index ba0f4e5ed..e91676b7b 100644 --- a/Flow.Launcher/App.xaml.cs +++ b/Flow.Launcher/App.xaml.cs @@ -147,6 +147,10 @@ namespace Flow.Launcher Log.SetLogLevel(_settings.LogLevel); + // Update dynamic resources base on settings + Current.Resources["SettingWindowFont"] = new FontFamily(_settings.SettingWindowFont); + Current.Resources["ContentControlThemeFontFamily"] = new FontFamily(_settings.SettingWindowFont); + Ioc.Default.GetRequiredService().PreStartCleanUpAfterPortabilityUpdate(); API.LogInfo(ClassName, "Begin Flow Launcher startup ----------------------------------------------------"); @@ -176,8 +180,6 @@ namespace Flow.Launcher await imageLoadertask; _mainWindow = new MainWindow(); - Current.Resources["SettingWindowFont"] = new FontFamily(_settings.SettingWindowFont); - Current.Resources["ContentControlThemeFontFamily"] = new FontFamily(_settings.SettingWindowFont); API.LogInfo(ClassName, "Dependencies Info:{ErrorReporting.DependenciesInfo()}");