style configurator - fix orange theme bug and dark mode default (#550)#552
Merged
style configurator - fix orange theme bug and dark mode default (#550)#552
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request updates the default style theme, modifies global override colors in stylers.xml, and implements logic to default to a dark mode theme when the system is in dark mode and no configuration is present. The reviewer suggested simplifying the theme selection logic by using the return value of config.getValue() to avoid redundant lookups and recommended using a shared constant for the "DarkModeDefault" string to improve maintainability.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes issue #550 where the style configurator would apply an orange theme incorrectly.
Changes:
xml-styles/stylers.xml: Changed the "Global override" background from orange (FF8000) to white and the foreground to black. This prevents the "orange surprise" when falling back to the default theme.conf-defs/fr_settings.confdef: Corrected the default style theme name fromstylestostylersto match the actual file name and the internal_defaultconstant.src/gui/PreferencesDialogStyle.cpp: Added logic toloadFromTargetConfigto useDarkModeDefaultwhen the system is in dark mode and no explicit theme has been saved yet. This ensures the Preferences dialog matches the application's initial dark state instead of reverting to the light default theme.These changes ensure a consistent experience across Dark and Light modes and fix the jarring orange color issue reported.