Use SystemPalette for dynamic theme-aware text colors#23
Open
citizenserious wants to merge 3 commits intoPrayag2:mainfrom
Open
Use SystemPalette for dynamic theme-aware text colors#23citizenserious wants to merge 3 commits intoPrayag2:mainfrom
citizenserious wants to merge 3 commits intoPrayag2:mainfrom
Conversation
Replace the static text color handling for day, date, and time with a theme-aware fallback based on SystemPalette. When follow_system_text_color is enabled, the labels use SystemPalette.windowText so the widget reacts correctly to Plasma light/dark theme changes at runtime. When the option is disabled, the existing manually configured text colors remain in use.
Introduce a new boolean config entry named follow_system_text_color. This setting controls whether the widget should use theme-provided text colors or the manually configured label colors. The default is enabled so the widget follows the active Plasma theme out of the box.
Add a new appearance setting that lets users switch between manual text colors and automatic theme-based text colors. Also disable the manual color pickers while the system text color option is enabled, so the UI clearly reflects which color source is currently active.
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.
Summary
This PR adds optional support for using the current system/Plasma theme text color for the clock labels.
Previously, day, date, and time text relied only on manually configured colors. This could make the widget unreadable when switching between light and dark Plasma themes.
Changes
follow_system_text_colorconfig optionSystemPalette.windowTextfor day, date, and time when the option is enabledWhy this approach
Other theme-color approaches did not behave correctly during testing on Fedora 43 / KDE Plasma 6.6.3.
SystemPalette.windowTextcorrectly followed live Plasma light/dark theme changes in actual use.Result
With this change:
Fixes
Fixes #14