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 + - - + 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 } } } 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 } } }