-
-
Notifications
You must be signed in to change notification settings - Fork 370
Improve Setting Window Font & Format xaml styles & Fix log message & Improve code quality #3487
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 14 commits
f50f2ff
25f39f6
8432fa3
02252c2
2d1e9ec
82f23e5
d867875
d01c67f
94ff72c
4df9c04
71ab7a6
8912789
8463304
82d97fd
686d106
192e2ef
22fb5b1
cbcebad
84b0393
7945292
5665758
197e9c4
e3573f3
856346a
defb283
f0512d7
755ddb4
c35eca2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -4,6 +4,7 @@ | |||||||||||
using System.Threading; | ||||||||||||
using System.Threading.Tasks; | ||||||||||||
using System.Windows; | ||||||||||||
using System.Windows.Media; | ||||||||||||
using CommunityToolkit.Mvvm.DependencyInjection; | ||||||||||||
using Flow.Launcher.Core; | ||||||||||||
using Flow.Launcher.Core.Configuration; | ||||||||||||
|
@@ -146,10 +147,14 @@ await API.StopwatchLogInfoAsync(ClassName, "Startup cost", async () => | |||||||||||
|
||||||||||||
Log.SetLogLevel(_settings.LogLevel); | ||||||||||||
|
||||||||||||
// Update dynamic resources base on settings | ||||||||||||
Current.Resources["SettingWindowFont"] = new FontFamily(_settings.SettingWindowFont); | ||||||||||||
Jack251970 marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||
Current.Resources["ContentControlThemeFontFamily"] = new FontFamily(_settings.SettingWindowFont); | ||||||||||||
|
||||||||||||
Comment on lines
+165
to
+168
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Dynamic resource updates for font families are performed both here and in the Settings property setter. Consider consolidating this logic to a single location to avoid redundant or conflicting updates.
Suggested change
Copilot uses AI. Check for mistakes. Positive FeedbackNegative Feedback There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No need to do so |
||||||||||||
Ioc.Default.GetRequiredService<Portable>().PreStartCleanUpAfterPortabilityUpdate(); | ||||||||||||
|
||||||||||||
API.LogInfo(ClassName, "Begin Flow Launcher startup ----------------------------------------------------"); | ||||||||||||
API.LogInfo(ClassName, "Runtime info:{ErrorReporting.RuntimeInfo()}"); | ||||||||||||
API.LogInfo(ClassName, $"Runtime info:{ErrorReporting.RuntimeInfo()}"); | ||||||||||||
|
||||||||||||
RegisterAppDomainExceptions(); | ||||||||||||
RegisterDispatcherUnhandledException(); | ||||||||||||
|
@@ -169,19 +174,16 @@ await API.StopwatchLogInfoAsync(ClassName, "Startup cost", async () => | |||||||||||
await PluginManager.InitializePluginsAsync(); | ||||||||||||
|
||||||||||||
// Change language after all plugins are initialized because we need to update plugin title based on their api | ||||||||||||
// TODO: Clean InternationalizationManager.Instance and InternationalizationManager.Instance.GetTranslation in future | ||||||||||||
await Ioc.Default.GetRequiredService<Internationalization>().InitializeLanguageAsync(); | ||||||||||||
|
||||||||||||
await imageLoadertask; | ||||||||||||
|
||||||||||||
_mainWindow = new MainWindow(); | ||||||||||||
|
||||||||||||
API.LogInfo(ClassName, "Dependencies Info:{ErrorReporting.DependenciesInfo()}"); | ||||||||||||
|
||||||||||||
Current.MainWindow = _mainWindow; | ||||||||||||
Current.MainWindow.Title = Constant.FlowLauncher; | ||||||||||||
|
||||||||||||
// main windows needs initialized before theme change because of blur settings | ||||||||||||
// Main windows needs initialized before theme change because of blur settings | ||||||||||||
Ioc.Default.GetRequiredService<Theme>().ChangeTheme(); | ||||||||||||
|
||||||||||||
Encoding.RegisterProvider(CodePagesEncodingProvider.Instance); | ||||||||||||
|
@@ -198,6 +200,10 @@ await API.StopwatchLogInfoAsync(ClassName, "Startup cost", async () => | |||||||||||
|
||||||||||||
#pragma warning restore VSTHRD100 // Avoid async void methods | ||||||||||||
|
||||||||||||
/// <summary> | ||||||||||||
/// Check startup only for Release | ||||||||||||
/// </summary> | ||||||||||||
[Conditional("RELEASE")] | ||||||||||||
private void AutoStartup() | ||||||||||||
{ | ||||||||||||
// we try to enable auto-startup on first launch, or reenable if it was removed | ||||||||||||
|
@@ -261,7 +267,7 @@ private void RegisterExitEvents() | |||||||||||
} | ||||||||||||
|
||||||||||||
/// <summary> | ||||||||||||
/// let exception throw as normal is better for Debug | ||||||||||||
/// Let exception throw as normal is better for Debug | ||||||||||||
/// </summary> | ||||||||||||
[Conditional("RELEASE")] | ||||||||||||
private void RegisterDispatcherUnhandledException() | ||||||||||||
|
@@ -270,7 +276,7 @@ private void RegisterDispatcherUnhandledException() | |||||||||||
} | ||||||||||||
|
||||||||||||
/// <summary> | ||||||||||||
/// let exception throw as normal is better for Debug | ||||||||||||
/// Let exception throw as normal is better for Debug | ||||||||||||
/// </summary> | ||||||||||||
[Conditional("RELEASE")] | ||||||||||||
private static void RegisterAppDomainExceptions() | ||||||||||||
|
@@ -279,7 +285,7 @@ private static void RegisterAppDomainExceptions() | |||||||||||
} | ||||||||||||
|
||||||||||||
/// <summary> | ||||||||||||
/// let exception throw as normal is better for Debug | ||||||||||||
/// Let exception throw as normal is better for Debug | ||||||||||||
/// </summary> | ||||||||||||
[Conditional("RELEASE")] | ||||||||||||
private static void RegisterTaskSchedulerUnhandledException() | ||||||||||||
|
Uh oh!
There was an error while loading. Please reload this page.