From 70f3a257981f313203aeafc59c35efbef3cd9cf9 Mon Sep 17 00:00:00 2001 From: darksignal7 Date: Wed, 8 Oct 2025 21:16:14 +0300 Subject: [PATCH] add animation to 'rect' date style --- .../cookieClock/dateIndicators/DateIndicator.qml | 5 ++++- .../cookieClock/dateIndicators/RectangleDate.qml | 13 +++++++------ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/DateIndicator.qml b/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/DateIndicator.qml index 850bc34f8..f1977117e 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/DateIndicator.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/DateIndicator.qml @@ -27,7 +27,7 @@ Item { // Rectangle date (only today's number) in right side of the clock Loader { id: rectLoader - + property real animIndex: root.style === "rect" ? 1.0 : 0.0 Behavior on animIndex { animation: Appearance.animation.elementResize.numberAnimation.createObject(this) @@ -35,6 +35,9 @@ Item { active: animIndex > 0 + anchors.right: parent.right + anchors.verticalCenter: parent.verticalCenter + sourceComponent: RectangleDate { color: Appearance.colors.colSecondaryContainerHover radius: Appearance.rounding.small diff --git a/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/RectangleDate.qml b/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/RectangleDate.qml index c24222206..c2410c81e 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/RectangleDate.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/RectangleDate.qml @@ -6,15 +6,16 @@ import qs.modules.common.widgets import QtQuick Rectangle { + id: rect readonly property string dialStyle: Config.options.background.clock.cookie.dialNumberStyle property real animIndex: 0 - opacity: animIndex + opacity: animIndex - width: 45 - height: 30 - - x: dialStyle === "numbers" ? 155 : 150 - y: dialStyle === "numbers" ? 155 : 100 + width: 45 * animIndex + height: 30 * animIndex + + x: root.dialStyle === "numbers" ? -40 : -10 + y: root.dialStyle === "numbers" ? 55 : 0 Behavior on x { animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this)