Add Setting for Changing Font in Settings Window#3470
Add Setting for Changing Font in Settings Window#3470onesounds merged 14 commits intoFlow-Launcher:devfrom
Conversation
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a configurable font setting specifically for the Settings window to address user requests for accessibility and localization improvements.
- Added a new string property for SettingWindowFont in the ViewModel and the underlying Settings.
- Implemented UI changes including a ComboBox selection handler and immediate font updates.
- Added a reset command and a method for retrieving the system default font.
Reviewed Changes
Copilot reviewed 5 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| Flow.Launcher/ViewModel/SettingWindowViewModel.cs | Added SettingWindowFont property with change notification. |
| Flow.Launcher/SettingWindow.xaml.cs | Imported Media namespace to support font updates. |
| Flow.Launcher/SettingPages/Views/SettingsPaneAbout.xaml.cs | Added a ComboBox selection handler to update the window's font immediately. |
| Flow.Launcher/SettingPages/ViewModels/SettingsPaneAboutViewModel.cs | Added SettingWindowFont property and a reset command for font settings. |
| Flow.Launcher.Infrastructure/UserSettings/Settings.cs | Introduced SettingWindowFont with a default value from GetSystemDefaultFont. |
Files not reviewed (2)
- Flow.Launcher/SettingPages/Views/SettingsPaneAbout.xaml: Language not supported
- Flow.Launcher/SettingWindow.xaml: Language not supported
Flow.Launcher/SettingPages/ViewModels/SettingsPaneAboutViewModel.cs
Outdated
Show resolved
Hide resolved
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Pull Request Overview
This PR adds an option to change the font used in the Settings window to support accessibility and localization needs. Key changes include:
- Introducing a new SettingWindowFont property (with proper property change notifications) in multiple view models.
- Updating the UI (via an event handler) to immediately reflect the font change.
- Enhancing the helper method GetSystemDefaultFont to accept an optional parameter for using the Noto font.
Reviewed Changes
Copilot reviewed 6 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| Flow.Launcher/ViewModel/SettingWindowViewModel.cs | Added SettingWindowFont property with property change notification. |
| Flow.Launcher/SettingWindow.xaml.cs | Added using directive for System.Windows.Media. |
| Flow.Launcher/SettingPages/Views/SettingsPaneAbout.xaml.cs | Introduced a ComboBox SelectionChanged handler to update the font. |
| Flow.Launcher/SettingPages/ViewModels/SettingsPaneAboutViewModel.cs | Added SettingWindowFont property and a reset command for the font. |
| Flow.Launcher/Infrastructure/Win32Helper.cs | Modified GetSystemDefaultFont to accept a boolean parameter for Noto. |
| Flow.Launcher.Infrastructure/UserSettings/Settings.cs | Added SettingWindowFont property with a default value from Win32Helper. |
Files not reviewed (2)
- Flow.Launcher/SettingPages/Views/SettingsPaneAbout.xaml: Language not supported
- Flow.Launcher/SettingWindow.xaml: Language not supported
Flow.Launcher/SettingPages/ViewModels/SettingsPaneAboutViewModel.cs
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Font settings such as FontFamily are not applied to elements like ComboBox or Button. Since applying this setting for every individual window would require too much work, I’ve decided to skip this part. |
This comment has been minimized.
This comment has been minimized.
|
@coderabbitai Review it please. |
|
🥷 Code experts: Jack251970, Yusyuriv Jack251970, onesounds 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: To learn more about /:\ gitStream - Visit our Docs |
|
Be a legend 🏆 by adding a before and after screenshot of the changes you made, especially if they are around UI/UX. |
There was a problem hiding this comment.
Pull Request Overview
This PR adds a customizable font setting for the Settings window, enabling users to change the font for accessibility or localization reasons. Key changes include:
- Adding a new SettingWindowFont property in various view models and windows.
- Implementing a font reset command in the SettingsPaneAboutViewModel.
- Initializing the default font via an update in Win32Helper and UserSettings.
Reviewed Changes
Copilot reviewed 10 out of 16 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| Flow.Launcher/ViewModel/SettingWindowViewModel.cs | Introduces the SettingWindowFont property with INotifyPropertyChanged implementation. |
| Flow.Launcher/SettingWindow.xaml.cs | Adds the necessary using directive for System.Windows.Media. |
| Flow.Launcher/SettingPages/Views/SettingsPaneAbout.xaml.cs | Implements font update on combo box selection to update the Settings window immediately. |
| Flow.Launcher/SettingPages/ViewModels/SettingsPaneAboutViewModel.cs | Adds the SettingWindowFont property and a reset command for changing the font. |
| Flow.Launcher/SelectFileManagerWindow.xaml.cs | Adds a SettingWindowFont property implementation with property change notifications. |
| Flow.Launcher/SelectBrowserWindow.xaml.cs | Introduces the SettingWindowFont property with its notification logic. |
| Flow.Launcher/CustomShortcutSetting.xaml.cs | Adds a SettingWindowFont property, but the _settings field is declared without initialization. |
| Flow.Launcher/CustomQueryHotkeySetting.xaml.cs | Adds a SettingWindowFont property and the corresponding property change notifications. |
| Flow.Launcher.Infrastructure/Win32Helper.cs | Updates GetSystemDefaultFont to include an optional parameter with XML docs. |
| Flow.Launcher.Infrastructure/UserSettings/Settings.cs | Adds a new SettingWindowFont property with a default value from Win32Helper. |
Files not reviewed (6)
- Flow.Launcher/CustomQueryHotkeySetting.xaml: Language not supported
- Flow.Launcher/Languages/en.xaml: Language not supported
- Flow.Launcher/SelectBrowserWindow.xaml: Language not supported
- Flow.Launcher/SelectFileManagerWindow.xaml: Language not supported
- Flow.Launcher/SettingPages/Views/SettingsPaneAbout.xaml: Language not supported
- Flow.Launcher/SettingWindow.xaml: Language not supported
Comments suppressed due to low confidence (1)
Flow.Launcher/CustomShortcutSetting.xaml.cs:38
- The private readonly _settings field is declared but never initialized in the constructor. Consider assigning it from the provided view model (for example, _settings = vm.Settings) to ensure the SettingWindowFont property works as intended.
public CustomShortcutSetting(SettingsPaneHotkeyViewModel vm)
… SettingWindowViewModel
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
@coderabbitai Review it. |
|
Tip For best results, initiate chat on the files or code changes. @onesounds I've reviewed the PR that adds font customization for the Settings window, and I'm impressed with the implementation. The changes are well-structured and thoughtfully designed:
Regarding the limitation of font settings not applying to ComboBox or Button elements - this is a reasonable decision given the complexity it would add to style every individual control. The current approach delivers the key benefits while keeping the implementation scope manageable. Overall, this is a solid implementation that effectively addresses the accessibility and localization needs mentioned in issue #2526. Great work! (_/) If you found this review helpful, would you consider giving us a shout-out on X? Thank you for using CodeRabbit! |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Pull Request Overview
This PR adds an option to change the font used in the Settings window to support accessibility and localization needs.
- Introduces a new SettingWindowFont property and a reset command in the About settings view model.
- Refactors several view models and settings classes to replace a private _settings field with a public Settings property.
- Updates Win32Helper to support a Noto font lookup via a new method parameter.
Reviewed Changes
Copilot reviewed 8 out of 15 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| Flow.Launcher/ViewModel/SettingWindowViewModel.cs | Exposes the settings instance publicly instead of a private field. |
| Flow.Launcher/SettingPages/ViewModels/SettingsPaneAboutViewModel.cs | Adds SettingWindowFont property and a reset command for font resetting. |
| Flow.Launcher/SelectFileManagerWindow.xaml.cs | Updates the INotifyPropertyChanged implementation with toolkit attribute. |
| Flow.Launcher/SelectBrowserWindow.xaml.cs | Similar update to INotifyPropertyChanged using the toolkit attribute. |
| Flow.Launcher/CustomShortcutSetting.xaml.cs | Refines dependency injection and property initializations. |
| Flow.Launcher/CustomQueryHotkeySetting.xaml.cs | Adjusts settings usage in updating custom hotkeys. |
| Flow.Launcher/Infrastructure/Win32Helper.cs | Modifies GetSystemDefaultFont to include a useNoto parameter. |
| Flow.Launcher/Infrastructure/UserSettings/Settings.cs | Adds the SettingWindowFont property with change notification. |
Files not reviewed (7)
- Flow.Launcher/CustomQueryHotkeySetting.xaml: Language not supported
- Flow.Launcher/CustomShortcutSetting.xaml: Language not supported
- Flow.Launcher/Languages/en.xaml: Language not supported
- Flow.Launcher/SelectBrowserWindow.xaml: Language not supported
- Flow.Launcher/SelectFileManagerWindow.xaml: Language not supported
- Flow.Launcher/SettingPages/Views/SettingsPaneAbout.xaml: Language not supported
- Flow.Launcher/SettingWindow.xaml: Language not supported
Comments suppressed due to low confidence (1)
Flow.Launcher/CustomQueryHotkeySetting.xaml.cs:15
- [nitpick] The flag 'update' is somewhat ambiguous. Consider renaming it to 'isUpdating' (or another descriptive name) to improve code clarity.
private bool update;
@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 ...
|
What's the PR
Although changing the font of the Settings window is an uncommon requirement, it has been requested multiple times and can be necessary in specific use cases (e.g., accessibility or localization issues).
This PR adds an option to change the font used in the Settings window.
To avoid cluttering the main settings, this option is intentionally placed in a less prominent location.
Todo
This PR continues from #3458.