From af5a7964d0bdb750b1b2948048a85346b12a6b82 Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Sat, 11 Oct 2025 17:52:08 +0200 Subject: [PATCH] cookie clock: adjust colors and terminology --- .../background/cookieClock/CookieClock.qml | 16 ++++++++++------ .../modules/background/cookieClock/HourHand.qml | 2 +- .../cookieClock/dateIndicator/BubbleDate.qml | 4 ++-- .../cookieClock/dateIndicator/DateIndicator.qml | 9 ++++----- .config/quickshell/ii/modules/common/Config.qml | 12 ++++++------ .../ii/modules/settings/InterfaceConfig.qml | 10 +++++----- 6 files changed, 28 insertions(+), 25 deletions(-) diff --git a/.config/quickshell/ii/modules/background/cookieClock/CookieClock.qml b/.config/quickshell/ii/modules/background/cookieClock/CookieClock.qml index 95c928d86..ba2f4721e 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/CookieClock.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/CookieClock.qml @@ -26,7 +26,7 @@ Item { property color colShadow: Appearance.colors.colShadow property color colBackground: Appearance.colors.colSecondaryContainer - property color colOnBackground: ColorUtils.mix(Appearance.colors.colSecondary, Appearance.colors.colSecondaryContainer, 0.3) + property color colOnBackground: ColorUtils.mix(Appearance.colors.colSecondary, Appearance.colors.colSecondaryContainer, 0.15) property color colBackgroundInfo: ColorUtils.mix(Appearance.colors.colPrimary, Appearance.colors.colSecondaryContainer, 0.55) property color colHourHand: Appearance.colors.colPrimary property color colMinuteHand: Appearance.colors.colSecondary @@ -58,7 +58,7 @@ Item { z: 0 implicitSize: root.implicitSize amplitude: implicitSize / 70 - sides: Config.options.background.clock.clockSides + sides: Config.options.background.clock.cookie.sides color: root.colBackground constantlyRotate: Config.options.background.clock.cookie.constantlyRotate } @@ -150,10 +150,14 @@ Item { } // Date - DateIndicator { + FadeLoader { anchors.fill: parent - colOnBackground: root.colBackgroundInfo - style: Config.options.background.clock.cookie.dateStyle - dateSquareSize: root.dateSquareSize + shown: Config.options.background.clock.cookie.dateStyle !== "hide" + + sourceComponent: DateIndicator { + color: root.colBackgroundInfo + style: Config.options.background.clock.cookie.dateStyle + dateSquareSize: root.dateSquareSize + } } } diff --git a/.config/quickshell/ii/modules/background/cookieClock/HourHand.qml b/.config/quickshell/ii/modules/background/cookieClock/HourHand.qml index 91dc24570..c38960256 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/HourHand.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/HourHand.qml @@ -13,7 +13,7 @@ Item { property string style: "fill" property color color: Appearance.colors.colPrimary - property real fillColorAlpha: root.style === "stroke" ? 0 : 1 + property real fillColorAlpha: root.style === "hollow" ? 0 : 1 Behavior on fillColorAlpha { animation: Appearance.animation.elementResize.numberAnimation.createObject(this) } diff --git a/.config/quickshell/ii/modules/background/cookieClock/dateIndicator/BubbleDate.qml b/.config/quickshell/ii/modules/background/cookieClock/dateIndicator/BubbleDate.qml index 079c9650a..3a86ccbbb 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/dateIndicator/BubbleDate.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/dateIndicator/BubbleDate.qml @@ -14,7 +14,7 @@ Item { z: 5 sides: bubbleIndex === 0 ? 4 : 1 anchors.centerIn: parent - color: bubbleIndex === 0.0 ? Appearance.colors.colPrimaryContainer : Appearance.colors.colTertiaryContainer + color: bubbleIndex === 0.0 ? Appearance.colors.colTertiaryContainer : Appearance.colors.colPrimaryContainer implicitSize: targetSize constantlyRotate: Config.options.background.clock.cookie.constantlyRotate } @@ -22,7 +22,7 @@ Item { z: 6 anchors.centerIn: parent text: bubbleIndex === 0.0 ? DateTime.date.substring(5, 7) : DateTime.date.substring(8, 10) - color: bubbleIndex === 0.0 ? Appearance.colors.colPrimary : Appearance.colors.colTertiary + color: bubbleIndex === 0.0 ? Appearance.colors.colTertiary : Appearance.colors.colPrimary opacity: root.style === "bubble" ? 1.0 : 0 font { family: Appearance.font.family.expressive diff --git a/.config/quickshell/ii/modules/background/cookieClock/dateIndicator/DateIndicator.qml b/.config/quickshell/ii/modules/background/cookieClock/dateIndicator/DateIndicator.qml index 2056bb692..0ac61a1e1 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/dateIndicator/DateIndicator.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/dateIndicator/DateIndicator.qml @@ -10,8 +10,7 @@ import QtQuick Item { id: root property string style: "rotating" - property color colOnBackground: Appearance.colors.colOnSecondaryContainer - property color colBackground: Appearance.colors.colOnSecondaryContainer + property color color: Appearance.colors.colOnSecondaryContainer property real dateSquareSize: 64 // Rotating date @@ -19,7 +18,7 @@ Item { anchors.fill: parent shown: Config.options.background.clock.cookie.dateStyle === "rotating" sourceComponent: RotatingDate { - color: root.colOnBackground + color: root.color } } @@ -34,7 +33,7 @@ Item { } sourceComponent: RectangleDate { - color: Appearance.colors.colSecondaryContainerHover + color: ColorUtils.mix(root.color, Appearance.colors.colSecondaryContainerHover, 0.5) radius: Appearance.rounding.small implicitWidth: 45 * rectLoader.opacity implicitHeight: 30 * rectLoader.opacity @@ -50,7 +49,7 @@ Item { left: parent.left top: parent.top } - + sourceComponent: BubbleDate { implicitWidth: dayBubbleLoader.targetSize implicitHeight: dayBubbleLoader.targetSize diff --git a/.config/quickshell/ii/modules/common/Config.qml b/.config/quickshell/ii/modules/common/Config.qml index 72e5ee721..904866b6a 100644 --- a/.config/quickshell/ii/modules/common/Config.qml +++ b/.config/quickshell/ii/modules/common/Config.qml @@ -129,13 +129,13 @@ Singleton { property bool show: true property string style: "cookie" // Options: "cookie", "digital" property real scale: 1 - property int clockSides: 12 property JsonObject cookie: JsonObject { - property string dialNumberStyle: "dots" // Options: "dots" , "numbers", "full" , "none" - property string hourHandStyle: "fill" // Options: "classic", "fill", "stroke", "hide" - property string minuteHandStyle: "medium" // Options "classic", "thin", "medium", "bold", "hide" - property string secondHandStyle: "dot" // Options: "dot", "line" , "none" - property string dateStyle: "rotating" // Options: "rotating", "rect", "bubble" , "none" + property int sides: 14 + property string dialNumberStyle: "full" // Options: "dots" , "numbers", "full" , "none" + property string hourHandStyle: "fill" // Options: "classic", "fill", "hollow", "hide" + property string minuteHandStyle: "medium" // Options "classic", "thin", "medium", "bold", "hide" + property string secondHandStyle: "dot" // Options: "dot", "line" , "hide" + property string dateStyle: "bubble" // Options: "rotating", "rect", "bubble" , "hide" property bool timeIndicators: true property bool hourMarks: true property bool dateInClock: true diff --git a/.config/quickshell/ii/modules/settings/InterfaceConfig.qml b/.config/quickshell/ii/modules/settings/InterfaceConfig.qml index 273948d7d..8396a917f 100644 --- a/.config/quickshell/ii/modules/settings/InterfaceConfig.qml +++ b/.config/quickshell/ii/modules/settings/InterfaceConfig.qml @@ -115,9 +115,9 @@ ContentPage { value: "classic" }, { - displayName: Translation.tr("Stroke"), + displayName: Translation.tr("Hollow"), icon: "stroke_partial", - value: "stroke" + value: "hollow" }, { displayName: Translation.tr("Fill"), @@ -214,7 +214,7 @@ ContentPage { { displayName: "", icon: "block", - value: "none" + value: "hide" }, { displayName: Translation.tr("Bubble"), @@ -239,12 +239,12 @@ ContentPage { visible: Config.options.background.clock.style === "cookie" icon: "support" text: Translation.tr("Clock sides") - value: Config.options.background.clock.clockSides + value: Config.options.background.clock.cookie.sides from: 1 to: 36 stepSize: 1 onValueChanged: { - Config.options.background.clock.clockSides = value; + Config.options.background.clock.cookie.sides = value; } }