feat(qt): Adapt configuration dialogs to system theme #9
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/light-dark-fix"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The main and per-game configuration dialogs used a hardcoded dark theme stylesheet. This caused a significant UI inconsistency when the rest of the application and the operating system were set to a light theme, making the dialogs difficult to read and visually jarring on both Windows and Linux.
This commit refactors the theme logic to be theme-aware.
Replaces hardcoded background, text, and border colors in the .ui stylesheets with dynamic placeholders (e.g., %%BACKGROUND_COLOR%%).
Implements a platform-agnostic IsDarkMode() helper that checks the application's QPalette to determine if a light or dark theme is active.
Enhances the UpdateTheme() C++ method in both dialogs. It now detects the current theme and substitutes the placeholders with the correct color codes for either light or dark mode.
The configuration dialogs now seamlessly integrate with the application's appearance, correctly adapting to both light and dark system themes while retaining all custom styling features.
Thanks to @angel for reporting this issue.
Collecting referenced this pull request2025-11-01 03:10:05 +00:00