-
-
Notifications
You must be signed in to change notification settings - Fork 367
Let more controls follow setting window font & Add Use Logon Task option in welcome page 5 #3486
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR refactors the pages to use dependency-injected Settings and WelcomeViewModel for better consistency, adds new controls (buttons, combo boxes, and plugin settings) with dynamic resource support, and introduces a "Use Logon Task" checkbox in welcome page 5. Key changes include updating the initialization pattern in WelcomePage1–3, refactoring custom hotkey settings to use private settings fields, and applying the "SettingWindowFont" dynamic resource across multiple controls.
Reviewed Changes
Copilot reviewed 45 out of 56 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
Flow.Launcher/Resources/Pages/WelcomePage3.xaml.cs | Refactored settings and viewmodel initialization |
Flow.Launcher/Resources/Pages/WelcomePage2.xaml.cs | Refactored dependency injection and initialization |
Flow.Launcher/Resources/Pages/WelcomePage1.xaml.cs | Refactored dependency injection and initialization |
Flow.Launcher/Resources/Controls/HotkeyDisplay.xaml.cs | Updated type checks with pattern matching |
Flow.Launcher/CustomShortcutSetting.xaml.cs | Removed redundant Settings property |
Flow.Launcher/CustomQueryHotkeySetting.xaml.cs | Refactored settings usage via a private readonly field |
Flow.Launcher/App.xaml.cs | Updated logging and resource updates with a potential issue |
Flow.Launcher/Infrastructure/UserSettings/Settings.cs | Updated dynamic resource updates in the property setter |
Flow.Launcher/Core/Plugin/JsonRPCPluginSettings.cs | Updated dynamic resource usage and variable naming |
Files not reviewed (11)
- Flow.Launcher/ActionKeywords.xaml: Language not supported
- Flow.Launcher/CustomQueryHotkeySetting.xaml: Language not supported
- Flow.Launcher/CustomShortcutSetting.xaml: Language not supported
- Flow.Launcher/HotkeyControl.xaml: Language not supported
- Flow.Launcher/HotkeyControlDialog.xaml: Language not supported
- Flow.Launcher/Resources/Controls/HotkeyDisplay.xaml: Language not supported
- Flow.Launcher/Resources/Controls/InstalledPluginDisplayKeyword.xaml: Language not supported
- Flow.Launcher/Resources/Pages/WelcomePage1.xaml: Language not supported
- Flow.Launcher/Resources/Pages/WelcomePage2.xaml: Language not supported
- Flow.Launcher/Resources/Pages/WelcomePage3.xaml: Language not supported
- Flow.Launcher/Resources/Pages/WelcomePage4.xaml: Language not supported
Comments suppressed due to low confidence (1)
Flow.Launcher/App.xaml.cs:177
- The variable '_settings' is undefined in this context; consider retrieving the Settings instance from dependency injection (e.g. Ioc.Default.GetRequiredService()) or declaring _settings before usage.
Current.Resources["SettingWindowFont"] = new FontFamily(_settings.SettingWindowFont);
@check-spelling-bot Report🔴 Please reviewSee the 📂 files view, the 📜action log, or 📝 job summary for details.
See ❌ Event descriptions for more information. If the flagged items are 🤯 false positivesIf items relate to a ...
|
Be a legend 🏆 by adding a before and after screenshot of the changes you made, especially if they are around UI/UX. |
📝 WalkthroughWalkthroughThis update standardizes the font styling across Flow Launcher’s settings and plugin UI by introducing a dynamic resource, Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Settings
participant App
participant ResourceDictionary
participant UIControls
User->>Settings: Change SettingWindowFont
Settings->>ResourceDictionary: Update "SettingWindowFont" resource
App->>ResourceDictionary: Set initial "SettingWindowFont" on startup
UIControls-->>ResourceDictionary: Bind FontFamily to "SettingWindowFont"
ResourceDictionary-->>UIControls: Notify font change (dynamic resource)
UIControls-->>User: Render with updated font
Possibly related PRs
Suggested labels
Poem
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🔭 Outside diff range comments (1)
Plugins/Flow.Launcher.Plugin.Sys/CommandKeywordSetting.xaml (1)
1-10
:⚠️ Potential issueTypo in resource key for window title
TheTitle
attribute uses{DynamicResource lowlauncher_plugin_sys_command_keyword_setting_window_title}
—it appears to be missing the leading “f”. It should be{DynamicResource flowlauncher_plugin_sys_command_keyword_setting_window_title}
to match the naming convention and ensure the resource is found.- Title="{DynamicResource lowlauncher_plugin_sys_command_keyword_setting_window_title}" + Title="{DynamicResource flowlauncher_plugin_sys_command_keyword_setting_window_title}"
🧹 Nitpick comments (13)
Plugins/Flow.Launcher.Plugin.ProcessKiller/Views/SettingsControl.xaml (1)
21-21
: Consistent font styling applied to CheckBox controls. You’ve correctly boundFontFamily
to theSettingWindowFont
dynamic resource for both checkboxes, ensuring these plugin settings follow the new styling standard.
Consider defining a reusableCheckBox
style in the plugin’s ResourceDictionary to avoid repeating theFontFamily
setter across multiple controls.Also applies to: 27-27
Plugins/Flow.Launcher.Plugin.WebSearch/SettingsControl.xaml (1)
112-125
: Consider using an implicit Button style for font family
You've appliedFontFamily="{DynamicResource SettingWindowFont}"
to each button to standardize the font. To reduce repetition and improve maintainability, consider defining an implicitStyle
in the plugin’s resource dictionary that targets allButton
elements and sets theFontFamily
once. This will eliminate the need to specifyFontFamily
on each individual button.Flow.Launcher/ViewModel/SettingWindowViewModel.cs (1)
8-13
: EncapsulateSettings
instance via constructor injection
Replacing the publicSettings
property with a private readonly_settings
field improves encapsulation. Consider adding a null check in the constructor to guard against invalid injection:public SettingWindowViewModel(Settings settings) { _settings = settings ?? throw new ArgumentNullException(nameof(settings)); }Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml (1)
42-45
: Consistent application ofSettingWindowFont
resource to controls
All interactive elements (ToggleSwitch
,ComboBox
,Button
,NumberBox
, etc.) now reference{DynamicResource SettingWindowFont}
forFontFamily
, ensuring unified styling and live updates.Consider defining implicit styles at the page or application level targeting common control types to set
FontFamily
by default, reducing repetitive XAML and adhering to DRY principles.Also applies to: 52-55, 63-66, 71-74, 79-82, 92-93, 101-102, 202-203, 212-213, 226-227, 239-240, 260-261, 273-274, 282-283, 288-289, 315-316, 326-327, 341-342, 365-366, 374-377
Plugins/Flow.Launcher.Plugin.Explorer/Views/ActionKeywordSetting.xaml (1)
117-120
: ApplySettingWindowFont
to dialog buttons
Both the Cancel and Done buttons now reference{DynamicResource SettingWindowFont}
. To avoid repetition, consider using a shared button style that setsFontFamily
.Also applies to: 125-127
Plugins/Flow.Launcher.Plugin.Program/ProgramSuffixes.xaml (2)
128-128
: Remove redundant zero margin.
Margin="0 0 0 0"
is unnecessary since it’s the default; consider omitting it for clarity.
159-159
: Consider removing default zero margin.
Margin="0 0 0 0"
on the inner StackPanel can be dropped since it has no effect.Flow.Launcher/CustomQueryHotkeySetting.xaml.cs (1)
33-33
: Unnecessary null-coalescing on CustomPluginHotkeys.
Settings.CustomPluginHotkeys
is initialized by default inSettings.cs
; the??=
guard can be removed.Flow.Launcher.Core/Plugin/JsonRPCPluginSettings.cs (1)
285-329
: Variable naming standardized to follow conventionsChanged variable name from
Btn
tobtn
for consistency with C# naming conventions for local variables.Plugins/Flow.Launcher.Plugin.Program/AddProgramSource.xaml (1)
63-64
: Improved XAML formatting with space-separated values.The conversion from comma-separated to space-separated values for margins and thicknesses improves readability and follows modern XAML formatting conventions.
Also applies to: 67-67, 81-81, 143-146
Flow.Launcher/Resources/Pages/WelcomePage5.xaml.cs (3)
40-65
: Variable naming in catch block could be improvedThe exception variable
e
in the catch block shadows the event parameter name used in event handlers. Consider using a more specific name for clarity.- catch (Exception e) + catch (Exception ex) - App.API.ShowMsg(App.API.GetTranslation("setAutoStartFailed"), e.Message); + App.API.ShowMsg(App.API.GetTranslation("setAutoStartFailed"), ex.Message);
67-98
: Well-structured new functionality for logon taskThe new methods for handling the "Use Logon Task" option are well-organized and properly integrated with the existing auto-startup functionality. The error handling is appropriate.
However, the same variable naming issue exists in the catch block.
- catch (Exception e) + catch (Exception ex) - App.API.ShowMsg(App.API.GetTranslation("setAutoStartFailed"), e.Message); + App.API.ShowMsg(App.API.GetTranslation("setAutoStartFailed"), ex.Message);
100-108
: Consider refactoring hide on startup handlers for consistencyFor consistency with the other settings, consider refactoring the "HideOnStartup" handlers to follow the same pattern as the other settings (extracting common logic into a
ChangeHideOnStartup
method).private void OnHideOnStartupChecked(object sender, RoutedEventArgs e) { - Settings.HideOnStartup = true; + ChangeHideOnStartup(true); } private void OnHideOnStartupUnchecked(object sender, RoutedEventArgs e) { - Settings.HideOnStartup = false; + ChangeHideOnStartup(false); } + +private void ChangeHideOnStartup(bool value) +{ + Settings.HideOnStartup = value; +}
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (56)
Flow.Launcher.Core/Plugin/JsonRPCPluginSettings.cs
(9 hunks)Flow.Launcher.Infrastructure/UserSettings/Settings.cs
(2 hunks)Flow.Launcher/ActionKeywords.xaml
(6 hunks)Flow.Launcher/App.xaml.cs
(4 hunks)Flow.Launcher/CustomQueryHotkeySetting.xaml
(3 hunks)Flow.Launcher/CustomQueryHotkeySetting.xaml.cs
(3 hunks)Flow.Launcher/CustomShortcutSetting.xaml
(4 hunks)Flow.Launcher/CustomShortcutSetting.xaml.cs
(0 hunks)Flow.Launcher/HotkeyControl.xaml
(3 hunks)Flow.Launcher/HotkeyControlDialog.xaml
(8 hunks)Flow.Launcher/Resources/Controls/HotkeyDisplay.xaml
(2 hunks)Flow.Launcher/Resources/Controls/HotkeyDisplay.xaml.cs
(1 hunks)Flow.Launcher/Resources/Controls/InstalledPluginDisplayKeyword.xaml
(1 hunks)Flow.Launcher/Resources/Pages/WelcomePage1.xaml
(2 hunks)Flow.Launcher/Resources/Pages/WelcomePage1.xaml.cs
(1 hunks)Flow.Launcher/Resources/Pages/WelcomePage2.xaml
(2 hunks)Flow.Launcher/Resources/Pages/WelcomePage2.xaml.cs
(1 hunks)Flow.Launcher/Resources/Pages/WelcomePage3.xaml
(2 hunks)Flow.Launcher/Resources/Pages/WelcomePage3.xaml.cs
(1 hunks)Flow.Launcher/Resources/Pages/WelcomePage4.xaml
(4 hunks)Flow.Launcher/Resources/Pages/WelcomePage4.xaml.cs
(1 hunks)Flow.Launcher/Resources/Pages/WelcomePage5.xaml
(1 hunks)Flow.Launcher/Resources/Pages/WelcomePage5.xaml.cs
(1 hunks)Flow.Launcher/Resources/SettingWindowStyle.xaml
(2 hunks)Flow.Launcher/SelectBrowserWindow.xaml
(9 hunks)Flow.Launcher/SelectBrowserWindow.xaml.cs
(3 hunks)Flow.Launcher/SelectFileManagerWindow.xaml
(10 hunks)Flow.Launcher/SelectFileManagerWindow.xaml.cs
(3 hunks)Flow.Launcher/SettingPages/ViewModels/SettingsPaneGeneralViewModel.cs
(2 hunks)Flow.Launcher/SettingPages/ViewModels/SettingsPanePluginStoreViewModel.cs
(0 hunks)Flow.Launcher/SettingPages/ViewModels/SettingsPaneProxyViewModel.cs
(2 hunks)Flow.Launcher/SettingPages/ViewModels/SettingsPaneThemeViewModel.cs
(3 hunks)Flow.Launcher/SettingPages/Views/SettingsPaneAbout.xaml
(5 hunks)Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml
(22 hunks)Flow.Launcher/SettingPages/Views/SettingsPaneHotkey.xaml
(3 hunks)Flow.Launcher/SettingPages/Views/SettingsPanePluginStore.xaml
(12 hunks)Flow.Launcher/SettingPages/Views/SettingsPanePlugins.xaml
(4 hunks)Flow.Launcher/SettingPages/Views/SettingsPaneProxy.xaml
(5 hunks)Flow.Launcher/SettingPages/Views/SettingsPaneTheme.xaml
(29 hunks)Flow.Launcher/SettingWindow.xaml
(3 hunks)Flow.Launcher/ViewModel/SettingWindowViewModel.cs
(1 hunks)Plugins/Flow.Launcher.Plugin.BrowserBookmark/Views/CustomBrowserSetting.xaml
(8 hunks)Plugins/Flow.Launcher.Plugin.BrowserBookmark/Views/SettingsControl.xaml
(3 hunks)Plugins/Flow.Launcher.Plugin.Calculator/Views/CalculatorSettings.xaml
(2 hunks)Plugins/Flow.Launcher.Plugin.Explorer/Views/ActionKeywordSetting.xaml
(5 hunks)Plugins/Flow.Launcher.Plugin.Explorer/Views/ExplorerSettings.xaml
(25 hunks)Plugins/Flow.Launcher.Plugin.PluginsManager/Views/PluginsManagerSettings.xaml
(1 hunks)Plugins/Flow.Launcher.Plugin.ProcessKiller/Views/SettingsControl.xaml
(1 hunks)Plugins/Flow.Launcher.Plugin.Program/AddProgramSource.xaml
(5 hunks)Plugins/Flow.Launcher.Plugin.Program/ProgramSuffixes.xaml
(6 hunks)Plugins/Flow.Launcher.Plugin.Program/Views/ProgramSetting.xaml
(4 hunks)Plugins/Flow.Launcher.Plugin.Shell/ShellSetting.xaml
(2 hunks)Plugins/Flow.Launcher.Plugin.Sys/CommandKeywordSetting.xaml
(3 hunks)Plugins/Flow.Launcher.Plugin.Sys/SysSettings.xaml
(1 hunks)Plugins/Flow.Launcher.Plugin.WebSearch/SearchSourceSetting.xaml
(7 hunks)Plugins/Flow.Launcher.Plugin.WebSearch/SettingsControl.xaml
(3 hunks)
💤 Files with no reviewable changes (2)
- Flow.Launcher/SettingPages/ViewModels/SettingsPanePluginStoreViewModel.cs
- Flow.Launcher/CustomShortcutSetting.xaml.cs
🧰 Additional context used
🧠 Learnings (2)
Flow.Launcher/HotkeyControl.xaml (1)
Learnt from: onesounds
PR: Flow-Launcher/Flow.Launcher#3394
File: Flow.Launcher/Themes/Darker Glass.xaml:134-141
Timestamp: 2025-03-28T21:12:13.386Z
Learning: In Flow.Launcher, hotkey styling is implemented with a two-component structure: a Border element with style `ItemHotkeyBGStyle` that provides background and border styling, containing a TextBlock with style `ItemHotkeyStyle` that handles the text styling.
Flow.Launcher/Resources/Controls/HotkeyDisplay.xaml (1)
Learnt from: onesounds
PR: Flow-Launcher/Flow.Launcher#3394
File: Flow.Launcher/Themes/Darker Glass.xaml:134-141
Timestamp: 2025-03-28T21:12:13.386Z
Learning: In Flow.Launcher, hotkey styling is implemented with a two-component structure: a Border element with style `ItemHotkeyBGStyle` that provides background and border styling, containing a TextBlock with style `ItemHotkeyStyle` that handles the text styling.
🧬 Code Graph Analysis (9)
Flow.Launcher/SelectBrowserWindow.xaml.cs (1)
Flow.Launcher.Infrastructure/UserSettings/Settings.cs (1)
Settings
(16-453)
Flow.Launcher/Resources/Pages/WelcomePage2.xaml.cs (4)
Flow.Launcher/Resources/Pages/WelcomePage4.xaml.cs (1)
OnNavigatedTo
(13-25)Flow.Launcher/Resources/Pages/WelcomePage3.xaml.cs (1)
OnNavigatedTo
(13-25)Flow.Launcher/Resources/Pages/WelcomePage1.xaml.cs (1)
OnNavigatedTo
(15-27)Flow.Launcher/Resources/Pages/WelcomePage5.xaml.cs (1)
OnNavigatedTo
(16-28)
Flow.Launcher/SelectFileManagerWindow.xaml.cs (1)
Flow.Launcher.Infrastructure/UserSettings/Settings.cs (1)
Settings
(16-453)
Flow.Launcher/CustomQueryHotkeySetting.xaml.cs (2)
Flow.Launcher.Infrastructure/UserSettings/Settings.cs (1)
Settings
(16-453)Flow.Launcher/HotkeyControl.xaml.cs (2)
HotkeyControl
(14-324)HotkeyControl
(208-216)
Flow.Launcher/Resources/Pages/WelcomePage3.xaml.cs (5)
Flow.Launcher/ViewModel/WelcomeViewModel.cs (1)
WelcomeViewModel
(5-67)Flow.Launcher/Resources/Pages/WelcomePage4.xaml.cs (1)
OnNavigatedTo
(13-25)Flow.Launcher/Resources/Pages/WelcomePage1.xaml.cs (1)
OnNavigatedTo
(15-27)Flow.Launcher/Resources/Pages/WelcomePage2.xaml.cs (1)
OnNavigatedTo
(17-29)Flow.Launcher/Resources/Pages/WelcomePage5.xaml.cs (1)
OnNavigatedTo
(16-28)
Flow.Launcher/Resources/Pages/WelcomePage1.xaml.cs (5)
Flow.Launcher/ViewModel/WelcomeViewModel.cs (1)
WelcomeViewModel
(5-67)Flow.Launcher/Resources/Pages/WelcomePage4.xaml.cs (1)
OnNavigatedTo
(13-25)Flow.Launcher/Resources/Pages/WelcomePage3.xaml.cs (1)
OnNavigatedTo
(13-25)Flow.Launcher/Resources/Pages/WelcomePage2.xaml.cs (1)
OnNavigatedTo
(17-29)Flow.Launcher/Resources/Pages/WelcomePage5.xaml.cs (1)
OnNavigatedTo
(16-28)
Flow.Launcher/Resources/Pages/WelcomePage4.xaml.cs (5)
Flow.Launcher/ViewModel/WelcomeViewModel.cs (1)
WelcomeViewModel
(5-67)Flow.Launcher/Resources/Pages/WelcomePage3.xaml.cs (1)
OnNavigatedTo
(13-25)Flow.Launcher/Resources/Pages/WelcomePage1.xaml.cs (1)
OnNavigatedTo
(15-27)Flow.Launcher/Resources/Pages/WelcomePage2.xaml.cs (1)
OnNavigatedTo
(17-29)Flow.Launcher/Resources/Pages/WelcomePage5.xaml.cs (1)
OnNavigatedTo
(16-28)
Flow.Launcher/App.xaml.cs (4)
Flow.Launcher/PublicAPIInstance.cs (1)
LogInfo
(210-211)Flow.Launcher/Helper/ErrorReporting.cs (2)
ErrorReporting
(11-64)RuntimeInfo
(42-53)Flow.Launcher/MainWindow.xaml.cs (2)
MainWindow
(35-1157)MainWindow
(80-92)Flow.Launcher.Infrastructure/Constant.cs (1)
Constant
(7-59)
Flow.Launcher.Core/Plugin/JsonRPCPluginSettings.cs (1)
Flow.Launcher.Core/Plugin/JsonRPCPluginBase.cs (1)
Control
(144-147)
⏰ Context from checks skipped due to timeout of 90000ms (3)
- GitHub Check: gitStream workflow automation
- GitHub Check: gitStream.cm
- GitHub Check: build
🔇 Additional comments (165)
Flow.Launcher/Resources/Controls/InstalledPluginDisplayKeyword.xaml (1)
46-46
: Applied dynamic font resource to Button. TheFontFamily="{DynamicResource SettingWindowFont}"
binding ensures this button inherits the global settings font, maintaining consistency across plugin controls.Plugins/Flow.Launcher.Plugin.PluginsManager/Views/PluginsManagerSettings.xaml (1)
20-20
: Dynamic font resource added to PluginsManager checkboxes. BothWarnFromUnknownSource
andAutoRestartAfterChanging
checkboxes now use theSettingWindowFont
resource, aligning them with the shared styling approach.Also applies to: 26-26
Plugins/Flow.Launcher.Plugin.Sys/SysSettings.xaml (1)
68-69
: Unified font styling for Sys plugin button. The "Edit" button now correctly references theSettingWindowFont
dynamic resource, ensuring its font matches the rest of the settings UI.Plugins/Flow.Launcher.Plugin.Calculator/Views/CalculatorSettings.xaml (1)
45-45
: FontFamily resource applied to ComboBox controls. Both decimal separator and max-decimal-places ComboBoxes now bindFontFamily
toSettingWindowFont
, ensuring the calculator settings UI adheres to global font settings.Also applies to: 69-69
Flow.Launcher/Resources/Pages/WelcomePage1.xaml (1)
130-130
: Margin formatting standardized for better readability.The conversion from comma-separated to space-separated format in margin attributes is a good practice that improves XAML readability and follows modern WPF conventions.
Also applies to: 154-155, 161-161, 166-166, 171-171, 177-177
Flow.Launcher/SettingWindow.xaml (2)
16-16
: Good implementation of font consistency at the window level.The addition of the
SettingWindowFont
dynamic resource to the root window ensures consistent font styling throughout the application, aligning with the PR's objective to enhance UI consistency.
216-219
: Font consistency applied to all navigation items.Excellent implementation of applying the
SettingWindowFont
dynamic resource to all NavigationViewItems. This ensures that the navigation menu maintains font consistency with the rest of the application, even when users change font settings.Also applies to: 225-228, 234-238, 244-247, 253-256, 262-265, 271-274
Flow.Launcher/ActionKeywords.xaml (3)
8-8
: Good implementation of font consistency at the window level.The addition of the
SettingWindowFont
dynamic resource to the root window ensures consistent font styling throughout the dialog, aligning with the PR's objective.
57-58
: Margin formatting standardized for better readability.The conversion from comma-separated to space-separated format in margin and border thickness attributes improves XAML readability and follows modern WPF conventions.
Also applies to: 61-61, 75-75, 87-87, 94-94, 105-105, 116-116, 122-122, 130-130
124-125
: Font consistency applied to buttons.Excellent application of the
SettingWindowFont
dynamic resource to the dialog buttons, ensuring that UI interactive elements maintain font consistency with the rest of the application.Also applies to: 132-133
Flow.Launcher/Resources/Pages/WelcomePage2.xaml (1)
59-59
: Margin formatting standardized for better readability.The conversion from comma-separated to space-separated format in margin attributes improves XAML readability and follows modern WPF conventions.
Also applies to: 92-92, 99-99, 104-104, 109-109, 114-114
Flow.Launcher/Resources/Pages/WelcomePage3.xaml (3)
16-16
: Consistent style setter formatting.
Margin, padding, and border‑thickness setters have been updated to use space‑separated values, aligning with other welcome‑page XAML files.Also applies to: 21-21, 24-24
39-39
: Uniform layout spacing.
TheTextBlock
,ScrollViewer
, and innerStackPanel
margins now use space‑separated syntax for consistency with project conventions.Also applies to: 46-46, 49-49
57-57
: Standardize card border thickness.
Allcc:Card
elements now specifyBorderThickness
with space‑separated values, matching the established XAML style guidelines.Also applies to: 65-65, 73-73, 81-81, 87-87, 95-95, 103-103
Flow.Launcher/SettingPages/Views/SettingsPanePlugins.xaml (4)
52-52
: Apply dynamic font to ComboBox.
TheDisplayModeComboBox
now binds itsFontFamily
to{DynamicResource SettingWindowFont}
, ensuring the new font setting is honored.
79-79
: Use setting window font in TextBox style.
TheTextBox
style’s setter now usesSettingWindowFont
, bringing its input text into the unified font scheme.
91-91
: Consistent cue banner typography.
The cue bannerLabel
inside theVisualBrush
now also bindsFontFamily
to{DynamicResource SettingWindowFont}
.
119-119
: ListBox follows global font setting.
The plugin list’sFontFamily
is now set toSettingWindowFont
, completing the pane’s font standardization.Flow.Launcher/HotkeyControlDialog.xaml (2)
8-8
: Standardize numeric list syntax.
Across the dialog, allBorderThickness
,Margin
,Padding
, and other attribute value lists have been converted from comma-separated to space-separated notation for better consistency with other XAML files.Also applies to: 27-27, 34-34, 45-46, 59-59, 64-64, 84-84, 100-100, 107-107, 108-108, 109-109, 110-110, 113-113, 114-114, 115-115, 125-125, 135-135
138-138
: Buttons adopt dynamic font resource.
All action buttons (Overwrite
,Save
,Reset
,Delete
,Cancel
) now bindFontFamily
to{DynamicResource SettingWindowFont}
, ensuring consistent UI font styling.Also applies to: 148-148, 156-156, 163-163, 170-170
Flow.Launcher/Resources/Pages/WelcomePage4.xaml (1)
8-8
: Apply consistent formatting to margins and padding.
XML namespace ordering adjusted and allPadding
,Margin
, and similar properties now use space-separated values, matching the syntax conventions of other welcome pages.Also applies to: 39-40, 84-84, 91-91, 98-98, 103-103
Plugins/Flow.Launcher.Plugin.Program/Views/ProgramSetting.xaml (2)
35-35
: Plugin settings now follow the new font resource.
EachCheckBox
andButton
control in the Program plugin settings view binds itsFontFamily
to{DynamicResource SettingWindowFont}
, ensuring the font setting applies uniformly.Also applies to: 43-43, 50-50, 56-56, 79-79, 85-85, 91-91, 97-97, 113-113, 121-121, 129-129, 211-211, 218-218, 225-225
210-210
: Minor reflow ofContent
attribute lines; no functional change.Also applies to: 217-217, 224-224
Plugins/Flow.Launcher.Plugin.WebSearch/SettingsControl.xaml (2)
139-147
: Consistent font applied to ComboBox
TheComboBox
now explicitly uses theSettingWindowFont
dynamic resource, aligning it with the application’s font settings and ensuring a uniform appearance.
149-156
: Consistent font applied to CheckBox
TheCheckBox
control now referencesSettingWindowFont
, ensuring that its text matches the rest of the settings UI.Plugins/Flow.Launcher.Plugin.WebSearch/SearchSourceSetting.xaml (1)
11-13
: Uniform application of SettingWindowFont dynamic resource
All key elements—including the rootWindow
, guideTextBox
, fieldTextBox
es, the icon selectionButton
, URL/action keywordTextBox
es, and theCheckBox
—now referenceSettingWindowFont
. This ensures consistent typography throughout the Search Source Settings UI.Also applies to: 79-86, 115-120, 135-142, 157-164, 173-179, 191-197
Plugins/Flow.Launcher.Plugin.Shell/ShellSetting.xaml (1)
21-78
: Standardized font styling across Shell settings
EveryCheckBox
andComboBox
in this control now explicitly uses theSettingWindowFont
dynamic resource, ensuring a cohesive look and feel across the Shell plugin’s settings UI.Flow.Launcher/CustomShortcutSetting.xaml (5)
9-11
: Applied SettingWindowFont to root window
The rootWindow
now referencesSettingWindowFont
for itsFontFamily
, ensuring the entire dialog honors the dynamic font setting.
107-113
: Consistent font on shortcut input field
TheTextBox
for the shortcut key now usesSettingWindowFont
, aligning it with the application’s font settings.
131-135
: Applied font to Test Shortcut button
ThebtnTestShortcut
control now uses the dynamic font resource, promoting consistency in the UI.
136-141
: Applied font to expansion TextBox
ThetbExpand
TextBox
now referencesSettingWindowFont
, keeping the font consistent in the preview area.
159-167
: Applied font to Cancel and Add buttons
Both the cancel and confirm buttons now use theSettingWindowFont
dynamic resource, ensuring button text matches other UI elements.Plugins/Flow.Launcher.Plugin.Sys/CommandKeywordSetting.xaml (3)
89-93
: Applied font to command keyword input
TheTextBox
for entering the custom command keyword now usesSettingWindowFont
forFontFamily
, ensuring consistent styling with the rest of the settings dialogs.
92-100
: Applied font to reset button
The reset button (btnResetCommand
) now referencesSettingWindowFont
, aligning its font with other UI elements in this window.
109-121
: Applied font to Cancel and Confirm buttons
Both dialog action buttons now explicitly use theSettingWindowFont
dynamic resource, completing the uniform font styling in this settings window.Flow.Launcher/Resources/Controls/HotkeyDisplay.xaml (2)
26-26
: Consistent formatting for XAML Padding and Margin properties.The change from comma-separated values to space-separated values in Padding and Margin properties improves readability and follows a more consistent XAML formatting style.
Also applies to: 31-31, 54-55, 60-61
66-69
: Applied consistent font styling with SettingWindowFont.Added dynamic resource reference for FontFamily to ensure this TextBlock follows the user's font preference settings. This change aligns with the PR objective of extending the setting window font to more UI controls.
Flow.Launcher/SelectFileManagerWindow.xaml.cs (1)
15-15
: Improved encapsulation by making Settings private.The Settings property has been correctly changed to a private readonly field with corresponding updates to all references. This change improves encapsulation and follows good object-oriented design principles.
Also applies to: 32-34, 45-46
Flow.Launcher/Resources/Controls/HotkeyDisplay.xaml.cs (1)
45-47
: Improved code with modern C# pattern matching.The type checks have been refactored to use C# pattern matching, which makes the code more concise and readable. The
is not
pattern eliminates the need for separate null checks and type casting.Flow.Launcher/SettingPages/Views/SettingsPaneHotkey.xaml (2)
57-57
: Applied consistent font styling to ComboBox and ToggleSwitch controls.Added dynamic resource reference for FontFamily to ensure these controls follow the user's font preference settings, consistent with the PR's objective.
Also applies to: 65-65
317-318
: Standardized button font styling with SettingWindowFont.Applied the dynamic font resource to all buttons in the custom hotkeys and shortcuts sections. This ensures consistent typography throughout the UI and allows users' font preferences to be applied universally.
Also applies to: 323-324, 329-330, 384-385, 390-391, 396-397
Plugins/Flow.Launcher.Plugin.BrowserBookmark/Views/CustomBrowserSetting.xaml (3)
12-12
: Font consistency applied to window level.Good addition of the dynamic resource
SettingWindowFont
to the window element, ensuring consistent font styling throughout this plugin view.
64-65
: Consistent margin format applied.Margin attributes have been reformatted from comma-separated to space-separated values for consistency with the rest of the codebase.
Also applies to: 74-74, 90-90
129-130
: Font consistency applied to UI controls.The dynamic resource
SettingWindowFont
has been applied to TextBox, ComboBox, and Button controls, ensuring consistent font styling across the UI.Also applies to: 147-149, 170-170, 177-178, 196-196, 202-203
Flow.Launcher/CustomQueryHotkeySetting.xaml (2)
11-11
: Font consistency applied to window level.Good addition of the dynamic resource
SettingWindowFont
to the window element, ensuring consistent font styling throughout this dialog.
123-124
: Font consistency applied to UI controls.The dynamic resource
SettingWindowFont
has been properly applied to TextBox and Button controls, ensuring consistent font styling across the UI.Also applies to: 132-133, 149-150, 156-157
Flow.Launcher/SettingPages/Views/SettingsPaneAbout.xaml (1)
42-43
: Font consistency applied to settings pane controls.The dynamic resource
SettingWindowFont
has been properly applied to buttons, menu items, and combo boxes in the About pane, ensuring consistent font styling across the settings interface.Also applies to: 46-47, 73-74, 107-108, 112-113, 122-123, 131-132, 140-141, 175-176, 182-183
Flow.Launcher/SettingPages/ViewModels/SettingsPaneGeneralViewModel.cs (1)
20-21
: Code formatting improvement.Added blank line after property declaration for better readability.
Flow.Launcher/Resources/SettingWindowStyle.xaml (2)
11-13
: Introduce theSettingWindowFont
dynamic resource
Adding<FontFamily x:Key="SettingWindowFont">Segoe UI</FontFamily>
centralizes font configuration and enables runtime updates, which aligns with the PR’s objectives. Ensure that any existing hard‑coded font settings are removed or overridden by this resource where needed.
377-384
: ApplySettingWindowFont
to empty‑plugin placeholders
The twoTextBlock
controls in thePluginListStyle
template now correctly reference{DynamicResource SettingWindowFont}
forFontFamily
, improving consistency for no‑result messages. Verify at runtime that these messages respect font changes when the user updates the setting.Flow.Launcher/ViewModel/SettingWindowViewModel.cs (2)
20-21
: Delegate save operation to the injected settings
Using_settings.Save()
directly keeps concerns separated between the view model and settings storage. This is clear and concise.
25-27
: Bind view model properties to_settings
fields
All view model properties now forward to_settings
, maintaining existing behavior. Ensure thatPropertyChanged
notifications are raised if these values can change at runtime and the UI needs to update. IfBaseModel
does not already handle this, implementOnPropertyChanged
calls in the setters.Also applies to: 31-33, 37-39
Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml (1)
18-21
: Verify availability ofSettingWindowFont
resource
This page does not explicitly mergeSettingWindowStyle.xaml
. Ensure thatSettingWindowFont
is loaded viaApp.xaml
merged dictionaries; otherwise, the dynamic resource lookup will fail at runtime.Plugins/Flow.Launcher.Plugin.Explorer/Views/ActionKeywordSetting.xaml (3)
13-13
: ApplySettingWindowFont
to window root
AddingFontFamily="{DynamicResource SettingWindowFont}"
at theWindow
level ensures all child text inherits the correct font by default.
85-87
: ApplySettingWindowFont
to input controls
TheTextBox
andCheckBox
controls now correctly use{DynamicResource SettingWindowFont}
. This aligns the plugin’s dialog with the application’s dynamic font setting.Also applies to: 99-103
111-111
: StandardizeBorderThickness
syntax
ChangingBorderThickness
to space‑separated values ("0 1 0 0"
) matches the project’s XAML style guidelines without affecting layout.Flow.Launcher/SettingPages/Views/SettingsPaneProxy.xaml (3)
5-5
: Add missingcc
namespace for controls
Introducingxmlns:cc="clr-namespace:Flow.Launcher.Resources.Controls"
is necessary forcc:Card
andcc:CardGroup
. Confirm that no unused namespaces were left behind.
22-22
: Set baseFontSize
onScrollViewer
AddingFontSize="14"
at the root of the scrollable region provides a consistent text size for child elements.
37-41
: ApplySettingWindowFont
to proxy settings controls
AllToggleSwitch
,TextBox
, and the Test ProxyButton
now use{DynamicResource SettingWindowFont}
, ensuring consistent font styling across the page.Also applies to: 46-49, 55-57, 61-64, 69-73, 79-82
Plugins/Flow.Launcher.Plugin.Program/ProgramSuffixes.xaml (22)
12-12
: Consistent dynamic font resource applied at window root.
The addition ofFontFamily="{DynamicResource SettingWindowFont}"
on the<Window>
ensures all child controls inherit the user-configurable font.
50-51
: Unified style syntax for margin and padding.
Switching to space-separated values for theMargin
andPadding
setters inSettingGroupBoxSuffixToolTip
aligns with the project’s XAML style guidelines.
69-70
: Apply consistent spacing syntax in URL tooltip style.
TheMargin
andPadding
setters inSettingGroupBoxURLToolTip
now use space-separated lists, matching the rest of the codebase.
124-125
: Standardize outer StackPanel margins.
Both StackPanels now use uniform space-separated margins (26 12 26 0
and0 0 0 12
) for consistent vertical spacing.
135-135
: Confirm bottom spacing on description TextBlock.
Margin="0 0 0 10"
provides needed separation from subsequent elements.
153-153
: Set grid-level margin for grouping.
Margin="0 20 0 12"
on the<Grid>
is appropriate to separate the two columns visually.
161-161
: Maintain inter-element spacing.
Margin="0 0 0 8"
correctly adds a small gap above the first label in the suffixes list.
168-168
: Consistent indentation margin on CheckBoxes.
AddingMargin="10 0 0 0"
ensures the checkboxes align with other inputs.
175-175
: Indentation margin applied to exe checkbox.
Matches the layout of preceding checkboxes.
182-182
: Indentation margin applied to lnk checkbox.
Layout is now consistent across all suffix options.
189-189
: Indentation margin for custom file types toggle.
Ensures the custom-files checkbox lines up with the others.
190-190
: Apply dynamic font to custom-file checkbox.
FontFamily="{DynamicResource SettingWindowFont}"
lets this control update when the user changes the setting.
194-194
: Spacing for custom suffixes input.
Margin="10 4 0 10"
provides clear separation before and after the TextBox.
200-200
: Margin on protocol panel.
Margin="20 0 0 10"
balances the two-column layout by adding left padding.
201-201
: Padding on protocol panel.
Padding="20 0 0 0"
visually separates the border from its contents.
203-203
: Border thickness syntax corrected.
BorderThickness="1 0 0 0"
properly defines only a left border.
253-253
: Footer Reset button margin updated.
Margin="0 0 5 0"
gives appropriate spacing between Reset and Cancel.
255-256
: Dynamic resource on Reset button.
Content
bound to the localized resource.FontFamily="{DynamicResource SettingWindowFont}"
for consistent font usage.
261-261
: Footer Cancel button margin tweaked.
Margin="5 0 5 0"
positions Cancel symmetrically between Reset and Update.
263-264
: Dynamic resource on Cancel button.
Content="{DynamicResource cancel}"
FontFamily="{DynamicResource SettingWindowFont}"
268-268
: Footer Update button margin.
Margin="5 0 0 0"
aligns Update to the right edge.
272-272
: Dynamic font on Update button.
Ensures the accent button also follows theSettingWindowFont
.Flow.Launcher/HotkeyControl.xaml (9)
10-10
: Formatting: Relocated Click attribute.
MovingClick="GetNewHotkey"
onto its own line improves readability.
13-13
: Formatting: Isolate Foreground attribute.
SeparatingForeground
onto its own line aligns with adjacent attributes.
18-18
: Formatting: Padding syntax updated.
Using space-separatedPadding="5 0 5 0"
matches the project’s style.
31-32
: Consolidate MultiTrigger setters.
Setters forBackground
andBorderBrush
are now single-line, making the trigger easier to scan.
38-38
: Simplify MultiTrigger setter.
Background
setter on one line matches the style of other triggers.
44-45
: Consolidate MultiTrigger pressed-state setters.
BothBackground
andBorderBrush
setters are now succinct.
60-60
: Space-separated margin on hotkey item.
Margin="2 5 2 5"
improves consistency with other XAML files.
61-61
: Space-separated padding on hotkey item.
Padding="10 5 10 5"
follows the updated formatting convention.
65-65
: Apply dynamic font to hotkey text.
AddingFontFamily="{DynamicResource SettingWindowFont}"
ensures uniform font in the hotkey list.Flow.Launcher/CustomQueryHotkeySetting.xaml.cs (4)
13-13
: Improve encapsulation by storing Settings as a private field.
Replacing the publicSettings
property with a readonly_settings
field reduces the class’s public surface.
20-20
: Assign injected Settings instance.
Initializing_settings
in the constructor correctly ties this window to the application settings.
39-39
: Add new plugin hotkey to settings.
Using_settings.CustomPluginHotkeys.Add(pluginHotkey)
correctly persists the entry.
58-59
: Retrieve existing hotkey for update.
Filtering the collection withFirstOrDefault
ensures the correct item is modified when updating.Flow.Launcher/SelectBrowserWindow.xaml (9)
13-13
: Apply dynamic font at window level.
AddingFontFamily="{DynamicResource SettingWindowFont}"
to the<Window>
makes all contained controls follow the user setting.
91-91
: Consistent font for ComboBox entries.
FontFamily="{DynamicResource SettingWindowFont}"
on the browser picker ensures it matches other controls.
104-105
: Dynamic font on Add button.
Content="{DynamicResource add}"
FontFamily="{DynamicResource SettingWindowFont}"
175-177
: Include dynamic font in button style.
Within thebtnBrowseFile
style, theFontFamily
setter syncs the button’s text withSettingWindowFont
.
191-191
: Apply dynamic font to path input.
TheTextBox
for the file path now usesSettingWindowFont
for consistency.
203-203
: Dynamic font on New Tab radio button.
- Moves
Content
to its own line for clarity.- Adds
FontFamily="{DynamicResource SettingWindowFont}"
.Also applies to: 205-206
207-210
: Dynamic font on New Window radio button.
Ensures both radio options follow the configured font.
263-264
: Dynamic font on Cancel button.
Content="{DynamicResource cancel}"
FontFamily="{DynamicResource SettingWindowFont}"
272-272
: Dynamic font on Done button.
FontFamily="{DynamicResource SettingWindowFont}"
lets the action button match the rest of the UI.Plugins/Flow.Launcher.Plugin.BrowserBookmark/Views/SettingsControl.xaml (7)
27-27
: Apply dynamic font to Chrome checkbox.
AddingFontFamily="{DynamicResource SettingWindowFont}"
ensures consistency in the browser list.
33-33
: Apply dynamic font to Edge checkbox.
Matches the styling of the Chrome checkbox.
37-37
: Apply dynamic font to Firefox checkbox.
Completes the set of bookmark loading options.
42-43
: Dynamic resources on “Others” button.
Content
bound to localized string.FontFamily
usesSettingWindowFont
.
74-75
: Dynamic font on Add Browser Bookmark button.
Content
andFontFamily
are now correctly bound for consistency.
83-85
: Include dynamic font in Edit button style.
Within the style setters:
IsEnabled
remains default true.FontFamily="{DynamicResource SettingWindowFont}"
added.
102-103
: Dynamic font on Remove Browser Bookmark button.
Content
bound to localized string andFontFamily
applied.Flow.Launcher/SelectFileManagerWindow.xaml (3)
13-13
: Properly implemented dynamic resource for window font.Adding
FontFamily="{DynamicResource SettingWindowFont}"
at the window level is an excellent approach to ensure consistent font styling across all child elements that don't explicitly override the font.
93-93
: Consistent font resource application on all UI controls.You've correctly applied the dynamic resource to all interactive elements (ComboBox, TextBox, Button) ensuring consistent font styling throughout the form.
Also applies to: 105-106, 111-111, 151-151, 189-189, 210-210, 230-230, 250-251
173-175
: Good use of Style.Setters for button style inheritance.Using Style.Setters to apply the dynamic font resource to buttons with custom styles ensures the font consistency is maintained even when inheriting from base styles.
Also applies to: 261-263
Flow.Launcher/Resources/Pages/WelcomePage5.xaml (2)
82-120
: Improved layout structure and added new startup option.The refactored StackPanel structure with improved margin consistency makes the UI more maintainable. The new checkbox for "Use Logon Task" startup option provides users with more control over the application's startup behavior.
This implementation aligns with the PR objective to "add a checkbox that allows users to enable the Use Logon Task option" on the welcome page.
99-105
: Well-implemented checkbox for logon task startup.The new checkbox is properly integrated with:
- Appropriate event handlers (OnUseLogonTaskChecked/Unchecked)
- Two-way data binding to Settings.UseLogonTaskForStartup
- Informative tooltip to explain this option to users
Flow.Launcher.Infrastructure/UserSettings/Settings.cs (2)
5-5
: Added necessary namespace for FontFamily.Properly importing System.Windows.Media for the FontFamily class.
117-117
: Excellent implementation of dynamic resource synchronization.This is a key improvement that ensures the SettingWindowFont dynamic resource stays synchronized with user settings. When a user changes the font in settings, the application resources are immediately updated, affecting all UI elements using this resource.
This change is central to the PR objective of "exposing the setting window font as a dynamic resource, enabling plugin developers to utilize this font setting within their own settings controls."
Flow.Launcher/App.xaml.cs (5)
7-7
: Added necessary namespace for FontFamily.Properly importing System.Windows.Media for the FontFamily class.
153-153
: Improved string formatting with interpolation.Changed concatenation to string interpolation for better readability.
176-178
: Key improvement: Initialize dynamic font resource before UI creation.This change ensures the SettingWindowFont dynamic resource is available before any UI components are created, allowing them to properly apply the font on initial render.
This initialization is essential for the PR's objective of extending font settings to additional controls and allowing plugins to use the setting.
179-185
: Proper initialization order for UI components.The MainWindow creation is correctly placed after initializing the font resources, and the comment explains the dependency on theme settings.
201-204
: Improved AutoStartup method with conditional compilation.Adding the Conditional attribute ensures the method is only included in Release builds, which is appropriate for startup-related functionality that should behave differently in development environments.
Plugins/Flow.Launcher.Plugin.Explorer/Views/ExplorerSettings.xaml (2)
177-177
: Consistent font styling applied to TabControlThis change adds the dynamic resource
SettingWindowFont
to the TabControl, which is part of the broader effort to standardize font styling across the application.
215-216
: Font styling standardized across all UI controlsThe dynamic resource
SettingWindowFont
has been applied to all CheckBox, TextBox, Button, and ComboBox controls in the Explorer plugin settings UI, ensuring consistent font styling throughout the application.Also applies to: 225-226, 245-246, 254-255, 274-275, 283-284, 303-304, 312-313, 329-330, 347-348, 365-366, 382-383, 400-401, 413-414, 459-460, 480-481, 554-555, 566-567, 603-604, 613-614, 628-629, 654-655, 710-711, 761-762, 768-769, 775-776, 824-825, 831-832, 838-839
Flow.Launcher.Core/Plugin/JsonRPCPluginSettings.cs (2)
218-218
: Improved style reference using FrameworkElementChanged from specific control style properties to the more general
FrameworkElement.StyleProperty
, which is a better practice as it's more flexible and consistent with WPF's inheritance model.Also applies to: 468-468
254-255
: Standardized font styling for dynamic settings controlsApplied the
SettingWindowFont
dynamic resource to all dynamically created controls (TextBox, Button, PasswordBox, ComboBox, CheckBox) to ensure consistent font styling throughout JsonRPC plugin settings panels.Also applies to: 278-279, 293-294, 349-350, 373-374, 396-397, 424-425
Flow.Launcher/Resources/Pages/WelcomePage3.xaml.cs (3)
10-11
: Improved encapsulation and added view model cachingChanged Settings property from public to private for better encapsulation, and added a private _viewModel field to cache the view model instance, which follows the pattern implemented in other welcome pages.
15-20
: Optimized initialization to occur only onceRefactored to initialize components only when the page isn't already initialized, preventing redundant initialization calls and improving performance.
23-24
: Updated page navigation with proper base method callSet the page number on the cached view model instance and added the required call to base.OnNavigatedTo(e), ensuring proper navigation behavior and consistency with other welcome pages.
Flow.Launcher/SelectBrowserWindow.xaml.cs (3)
13-13
: Improved encapsulation with private fieldReplaced public Settings property with a private readonly field _settings, improving encapsulation and preventing external modification of the settings instance.
30-33
: Updated field references for consistencyUpdated initialization code to use the new private _settings field, maintaining functionality while improving encapsulation.
43-45
: Updated settings references in save operationUpdated the settings saving logic to use the private _settings field, maintaining functionality with improved encapsulation.
Flow.Launcher/Resources/Pages/WelcomePage4.xaml.cs (3)
10-11
: Improved encapsulation of the Settings property.The change from public to private setter for the
Settings
property improves encapsulation and prevents unwanted external modifications to this property, while still allowing it to be read from outside the class.
15-20
: Optimized initialization to occur only once.Good refactoring to initialize components only when they haven't been initialized before. This pattern ensures that:
- The
Settings
and_viewModel
references are obtained only once from the IoC containerInitializeComponent()
is called only once, preventing potential issues with multiple initializations- The code follows the same pattern used across other welcome pages
This creates a consistent, efficient, and maintainable initialization pattern.
23-24
: Improved efficiency by using cached view model instance.Using the cached
_viewModel
instance instead of retrieving it from the IoC container every time is more efficient and maintains state between navigations.Flow.Launcher/SettingPages/Views/SettingsPaneTheme.xaml (5)
103-103
: Consistent font styling for slider controls.Applying the dynamic
SettingWindowFont
resource to slider controls ensures consistent font styling throughout the application. This aligns with the PR objective of extending font settings to more UI elements.Also applies to: 120-120, 132-132, 166-166, 183-183
132-132
: Standardized font for ComboBox controls.Applying the dynamic
SettingWindowFont
resource to ComboBox controls ensures consistent font styling throughout the application, improving the overall user experience.Also applies to: 141-141, 195-195, 204-204, 241-241, 250-250
274-274
: Standardized font for Button controls.Applying the dynamic
SettingWindowFont
resource to Button controls maintains visual consistency with other UI elements, creating a more professional and cohesive appearance.Also applies to: 281-281
355-355
: Updated ClockPanel font binding.Changed from direct binding to using the
ClockPanelFont
property withMode=OneTime
, which is more efficient for fonts that don't change after initial setup. This approach reduces unnecessary update notifications.Also applies to: 361-361
463-463
: Consistent font styling across multiple control types.Comprehensively applied the dynamic
SettingWindowFont
resource to various control types (ToggleSwitch, TextBlock, etc.) throughout the theme settings. This ensures visual consistency across the entire settings interface, fulfilling the PR's objective of extending font settings to more UI elements.Also applies to: 545-545, 573-573, 581-581, 604-604, 645-645, 684-684, 702-702, 754-754, 768-768, 775-775, 790-790, 805-806
Flow.Launcher/SettingPages/Views/SettingsPanePluginStore.xaml (2)
40-40
: Standardized XAML spacing format.Changed comma-separated values to space-separated values in properties like Margin, Padding, etc. This improves XAML readability and maintains consistent formatting standards across the codebase.
Also applies to: 42-42, 52-52, 58-58, 79-79, 102-104, 117-120, 132-132
62-62
: Consistent font styling for Plugin Store UI.Applied the dynamic
SettingWindowFont
resource to TextBox, Label, Button, TextBlock, and ListView controls in the Plugin Store UI. This ensures visual consistency with the rest of the application, implementing the PR's goal of extending font settings to more UI elements.Also applies to: 81-81, 109-109, 119-119, 132-132, 243-243, 300-301, 311-312, 342-342, 352-352
Flow.Launcher/Resources/Pages/WelcomePage1.xaml.cs (4)
4-5
: Updated imports for resource management.The changes to the imports add
Flow.Launcher.Core.Resource
and updateFlow.Launcher.Infrastructure.UserSettings
for proper resource handling, which aligns with the font styling and internationalization improvements in this PR.
12-13
: Improved encapsulation and added cached view model.Changed the
Settings
property to have a private setter for better encapsulation, and added a private_viewModel
field to cache the WelcomeViewModel instance. This prevents unwanted external modifications and improves performance by avoiding repeated IoC container lookups.
17-22
: Optimized initialization pattern.Refactored the initialization logic to occur only once when
!IsInitialized
is true. This pattern:
- Prevents redundant initialization
- Retrieves dependencies from the IoC container only when needed
- Creates consistency with the initialization pattern used in other welcome pages
This is a well-structured improvement to the component's lifecycle management.
25-26
: Using cached view model for page navigation.Uses the cached
_viewModel
instance to set the page number and calls the base class'sOnNavigatedTo
method. This ensures proper page navigation state management and maintains consistency with other welcome pages.Plugins/Flow.Launcher.Plugin.Program/AddProgramSource.xaml (5)
11-13
: Good addition of the SettingWindowFont resource.Adding the dynamic font resource to the window element ensures consistent font styling across the UI, which aligns well with the PR objectives of extending font settings to more controls.
108-110
: Proper implementation of font styling for Button control.The addition of FontFamily binding to the SettingWindowFont dynamic resource for the "Browse" button ensures consistent font styling, which is in line with the PR's objective of extending font settings to additional UI controls.
116-119
: Good font styling consistency for TextBox.Adding the FontFamily binding to the Directory TextBox maintains visual consistency with other controls, following the PR's goal of standardizing the UI appearance.
133-136
: Appropriate font styling for CheckBox.The addition of FontFamily binding to the checkbox ensures it adopts the same font as other controls in the settings window, improving UI consistency.
151-154
: Consistent font styling applied to bottom buttons.Both the Cancel and Add buttons now use the SettingWindowFont dynamic resource, providing consistent typography throughout the dialog. This matches the PR objectives of extending font settings to more UI controls.
Also applies to: 158-162
Flow.Launcher/Resources/Pages/WelcomePage2.xaml.cs (4)
14-15
: Good encapsulation of Settings property.Changing the Settings property to have a private setter improves encapsulation and follows the principle of least privilege. The addition of the private _viewModel field allows for efficient caching of the view model instance.
19-24
: Effective initialization pattern.The conditional initialization based on IsInitialized prevents redundant component initialization when navigating to the page multiple times, which is more efficient. This approach is consistently applied across all welcome pages.
27-28
: Proper page numbering and base method call.Using the cached _viewModel instance instead of fetching it again improves efficiency. The explicit call to base.OnNavigatedTo ensures proper parent class initialization.
1-8
: Well-organized using directives.The reorganization of using directives improves code readability while maintaining the functionality.
Flow.Launcher/SettingPages/ViewModels/SettingsPaneProxyViewModel.cs (3)
15-16
: Improved encapsulation of updater field.Changing _updater to a private readonly field follows best practices for encapsulation and immutability, preventing unintended modifications from outside the class.
Also applies to: 20-20
2-3
: Good implementation of asynchronous method pattern.The method has been correctly updated to use the async/await pattern, including proper naming with the "Async" suffix and returning a Task. This improves the application's responsiveness by not blocking the UI thread during network operations.
Also applies to: 24-28
30-55
: Excellent modernization to HttpClient from HttpWebRequest.The refactoring to use HttpClient instead of the older HttpWebRequest is a significant improvement:
- HttpClient is designed for better performance and async operations
- The code is more concise and readable with async/await
- The status code checking is simplified with IsSuccessStatusCode
- Resource management is improved with using statement
This change follows modern .NET development best practices and will improve the application's responsiveness.
Flow.Launcher/SettingPages/ViewModels/SettingsPaneThemeViewModel.cs (3)
25-27
: Improved field encapsulation.Removing the public setter for Settings and making _theme a private readonly field enhances encapsulation and prevents unintended modifications, following best practices for immutable dependencies.
293-294
: Better property initialization pattern.Converting properties with computed getters to auto-properties initialized in the constructor simplifies the code and improves performance by avoiding repeated computations when accessing these properties.
Also applies to: 300-300
441-485
: Efficient initialization in constructor.Moving the initialization of _theme, ClockPanelFont, and PreviewResults to the constructor is a significant improvement:
- It prevents redundant object creation on each property access
- Sample results are created only once instead of every time the property is accessed
- The font family is also initialized once, improving performance
This change follows good software engineering practices of initialization-time work versus access-time work, especially for expensive operations.
Flow.Launcher/Resources/Pages/WelcomePage5.xaml.cs (4)
13-14
: Good encapsulation improvementChanging the
Settings
property setter to private and adding a dedicated field for the view model improves encapsulation and follows better object-oriented practices.
18-23
: Good initialization patternMoving initialization code inside the
IsInitialized
check prevents redundant initialization during navigation events. This is a cleaner approach that avoids potential issues with component re-initialization.
26-27
: Improved navigation handlingDirectly setting
_viewModel.PageNum
is more efficient than retrieving it repeatedly. The addition of the base method call ensures proper navigation handling.
30-38
: Good refactoring of event handlersExtracting common logic into a dedicated method improves code maintainability and reduces duplication.
Wow, I can’t believe you added all that. If this feature was necessary, you should’ve just told me. I’m not entirely sure, but if SettingFont can be used as a DynamicResource, then instead of setting FontFamily on every control, it might be possible to simply override it in the styles by adding a FontFamily setter for each control type. (Like how controls inside a CustomControlTemplate can be styled to reflect font changes elsewhere.) The current approach, after merging this, effectively forces developers to set FontFamily in every XAML control, doesn’t it? That’s not something devs are going to be happy about. Anyway, it does work. |
🥷 Code experts: onesounds onesounds, Jack251970 have most 👩💻 activity in the files. See details
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame: To learn more about /:\ gitStream - Visit our Docs |
@coderabbitai Review it. This PR currently adds FontFamily settings to every control, but instead of doing that, isn’t there a simpler way to override the styles of specific controls (like ComboBox, Button, etc.) to apply a certain font? What I want is: if a control doesn’t have a FontFamily explicitly set in XAML, it should use font “A” by default. But if the FontFamily is set in XAML, then that should take precedence. I don’t want to manually set FontFamily every time I add a new UI element in the future. |
Tip For best results, initiate chat on the files or code changes. |
Oh, I have not noticed you have set fonts here... |
But you still need to explicitly set style by its key here. |
Well, I get it. I will check it then. |
Implemented in #3487 |
Let more controls follow setting window font
Follow on with #3470.
This PR adds more controls like button, combo box, plugin settings control (preinstalled Csharp plugins & JsonRPC plugins), etc. And this PR also exposes setting window font in
{DynamicResource SettingWindowFont}
so that plugin developers can use them in their settings control.Allow users to enable Use Logon Task in welcome page 5
This PR adds Use Logon Task check box in welcome page 5.