Skip to content

style configurator - fix orange theme bug and dark mode default (#550)#552

Merged
mariuz merged 2 commits intomasterfrom
issue-550-style-orange-bug
Apr 29, 2026
Merged

style configurator - fix orange theme bug and dark mode default (#550)#552
mariuz merged 2 commits intomasterfrom
issue-550-style-orange-bug

Conversation

@mariuz
Copy link
Copy Markdown
Owner

@mariuz mariuz commented Apr 29, 2026

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 from styles to stylers to match the actual file name and the internal _default constant.
  • src/gui/PreferencesDialogStyle.cpp: Added logic to loadFromTargetConfig to use DarkModeDefault when 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.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread src/gui/PreferencesDialogStyle.cpp Outdated
Comment thread src/gui/PreferencesDialogStyle.cpp Outdated
@mariuz mariuz merged commit 420e4ad into master Apr 29, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant