From eeed075be22e61103f0ccf39b36e106677655642 Mon Sep 17 00:00:00 2001 From: darksignal7 Date: Wed, 8 Oct 2025 19:00:21 +0300 Subject: [PATCH] make 'numbers' dial and 'rotating' date respect each other on position --- .../cookieClock/dateIndicators/DateIndicator.qml | 4 +++- .../cookieClock/dateIndicators/RotatingDate.qml | 13 ++++++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/DateIndicator.qml b/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/DateIndicator.qml index 3e96dae05..1c7bbebca 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/DateIndicator.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/DateIndicator.qml @@ -18,7 +18,9 @@ Item { Loader { anchors.fill: parent active: opacity > 0 - sourceComponent: RotatingDate {} + sourceComponent: RotatingDate { + style: root.style + } } // Square date (only today's number) in right side of the clock diff --git a/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/RotatingDate.qml b/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/RotatingDate.qml index 9ba30530e..344f8058b 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/RotatingDate.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/RotatingDate.qml @@ -9,7 +9,13 @@ import QtQuick Item { id: root - property real radius: 65 + property string style: Config.options.background.clock.cookie.dateStyle + readonly property string dialStyle: Config.options.background.clock.cookie.dialNumberStyle + + property real radius: style === "rotating" ? dialStyle === "numbers" ? 90 : 65 : 0 + Behavior on radius { + animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) + } property string dateText: Qt.locale().toString(DateTime.clock.date, "ddd dd") property real angleStep: Math.PI / 2.35 / dateText.length @@ -17,6 +23,11 @@ Item { property color dayColor: Appearance.colors.colSecondary property color monthColor: Appearance.colors.colSecondaryHover + opacity: style === "rotating" ? 1.0 : 0.0 + Behavior on opacity { + animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) + } + rotation: { if (!Config.options.time.secondPrecision) return 0 else return secondHandLoader.item.rotation + 45 // +45 to center the text