From 9a6c8a9fc654451c433632f2cfeec9796a5fce19 Mon Sep 17 00:00:00 2001 From: citizenserious <62773866+citizenserious@users.noreply.github.com> Date: Mon, 6 Apr 2026 02:15:29 +0000 Subject: [PATCH 1/3] Use SystemPalette for theme-aware clock text colors 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. --- package/contents/ui/main.qml | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/package/contents/ui/main.qml b/package/contents/ui/main.qml index d298c2d..b844f79 100644 --- a/package/contents/ui/main.qml +++ b/package/contents/ui/main.qml @@ -7,6 +7,10 @@ import org.kde.plasma.core as PlasmaCore import org.kde.plasma.plasma5support as Plasma5Support PlasmoidItem { + SystemPalette { + id: sysPalette + colorGroup: SystemPalette.Active + } id: root @@ -80,9 +84,12 @@ PlasmoidItem { font.pixelSize: plasmoid.configuration.day_font_size font.letterSpacing: plasmoid.configuration.day_letter_spacing font.family: font_anurati.name - color: plasmoid.configuration.day_font_color anchors.horizontalCenter: parent.horizontalCenter horizontalAlignment: Text.AlignHCenter + + color: plasmoid.configuration.follow_system_text_color + ? sysPalette.windowText + : plasmoid.configuration.day_font_color } // The Date @@ -96,9 +103,12 @@ PlasmoidItem { font.pixelSize: plasmoid.configuration.date_font_size font.letterSpacing: plasmoid.configuration.date_letter_spacing font.family: font_poppins.name - color: plasmoid.configuration.date_font_color horizontalAlignment: Text.AlignHCenter anchors.horizontalCenter: parent.horizontalCenter + + color: plasmoid.configuration.follow_system_text_color + ? sysPalette.windowText + : plasmoid.configuration.date_font_color } // The Time @@ -111,10 +121,13 @@ PlasmoidItem { // font settings font.pixelSize: plasmoid.configuration.time_font_size font.family: font_poppins.name - color: plasmoid.configuration.time_font_color font.letterSpacing: plasmoid.configuration.time_letter_spacing horizontalAlignment: Text.AlignHCenter anchors.horizontalCenter: parent.horizontalCenter + + color: plasmoid.configuration.follow_system_text_color + ? sysPalette.windowText + : plasmoid.configuration.time_font_color } } } From de77daf054508d08b5ec7579efd8474d1bcdca76 Mon Sep 17 00:00:00 2001 From: citizenserious <62773866+citizenserious@users.noreply.github.com> Date: Mon, 6 Apr 2026 02:18:38 +0000 Subject: [PATCH 2/3] Add follow_system_text_color configuration option 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. --- package/contents/config/main.xml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/package/contents/config/main.xml b/package/contents/config/main.xml index af9d50e..6e7d76a 100644 --- a/package/contents/config/main.xml +++ b/package/contents/config/main.xml @@ -48,8 +48,11 @@ false + + true + - - + From 1008b8513d93d1e04baabc7d4e0203b8bdf7aea3 Mon Sep 17 00:00:00 2001 From: citizenserious <62773866+citizenserious@users.noreply.github.com> Date: Mon, 6 Apr 2026 02:19:57 +0000 Subject: [PATCH 3/3] Expose system text color toggle in appearance settings 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. --- package/contents/ui/configAppearance.qml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/package/contents/ui/configAppearance.qml b/package/contents/ui/configAppearance.qml index d331b67..206c666 100644 --- a/package/contents/ui/configAppearance.qml +++ b/package/contents/ui/configAppearance.qml @@ -23,8 +23,13 @@ Kirigami.ScrollablePage { property alias cfg_time_character: timeCharacter.text property alias cfg_date_format: dateFormat.text property alias cfg_date_font_color: dateFontColor.color + property alias cfg_follow_system_text_color: followSystemTextColor.checked Kirigami.FormLayout { + RowLayout { + Label { text: i18n("Follow system text color") } + CheckBox { id: followSystemTextColor } + } Title { title: i18n("Day") } @@ -47,6 +52,7 @@ Kirigami.ScrollablePage { ColorDial { id: dayFontColor color: cfg_day_font_color + enabled: !followSystemTextColor.checked } Title { title: i18n("Date") @@ -78,6 +84,7 @@ Kirigami.ScrollablePage { ColorDial { id: dateFontColor color: cfg_date_font_color + enabled: !followSystemTextColor.checked } Title { @@ -119,6 +126,7 @@ Kirigami.ScrollablePage { ColorDial { id: timeFontColor color: cfg_time_font_color + enabled: !followSystemTextColor.checked } } }