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