From 02631da9f16200fa71cc9f2cc81e6b2bcaf0d017 Mon Sep 17 00:00:00 2001 From: darksignal7 Date: Sun, 5 Oct 2025 20:07:03 +0300 Subject: [PATCH] add hiding animation to hands --- .../quickshell/ii/modules/background/CookieClock.qml | 10 ++++++++-- .../quickshell/ii/modules/settings/InterfaceConfig.qml | 10 +++++----- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/.config/quickshell/ii/modules/background/CookieClock.qml b/.config/quickshell/ii/modules/background/CookieClock.qml index f56787395..ae812ee21 100644 --- a/.config/quickshell/ii/modules/background/CookieClock.qml +++ b/.config/quickshell/ii/modules/background/CookieClock.qml @@ -198,10 +198,13 @@ Item { // Hour hand Item { - visible: Config.options.background.clock.cookie.hourHandStyle === "hide" ? false : true + opacity: Config.options.background.clock.cookie.hourHandStyle === "hide" ? 0.0 : 1.0 anchors.fill: parent z: Config.options.background.clock.cookie.hourHandStyle === "fill" ? 3 : 1 rotation: -90 + (360 / 12) * (root.clockHour + root.clockMinute / 60) + Behavior on opacity { + animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) + } Rectangle { opacity: Config.options.background.clock.cookie.hourHandStyle !== "hide" ? 1.0 : 0 anchors.verticalCenter: parent.verticalCenter @@ -223,13 +226,16 @@ Item { // Minute hand Item { - visible: Config.options.background.clock.cookie.minuteHandStyle === "hide" ? false : true + opacity: Config.options.background.clock.cookie.minuteHandStyle === "hide" ? 0.0 : 1.0 anchors.fill: parent z: Config.options.background.clock.cookie.minuteHandStyle === "thin" ? 1 : 3 rotation: -90 + (360 / 60) * root.clockMinute Behavior on rotation{ animation: Appearance.animation.elementResize.numberAnimation.createObject(this) } + Behavior on opacity { + animation: Appearance.animation.elementResize.numberAnimation.createObject(this) + } Rectangle { anchors.verticalCenter: parent.verticalCenter x: Config.options.background.clock.cookie.minuteHandStyle === "classic" ? (parent.width / 2 - minuteHandWidth / 2) - 15 : parent.width / 2 - minuteHandWidth / 2 diff --git a/.config/quickshell/ii/modules/settings/InterfaceConfig.qml b/.config/quickshell/ii/modules/settings/InterfaceConfig.qml index 454456a4f..6cf2f5093 100644 --- a/.config/quickshell/ii/modules/settings/InterfaceConfig.qml +++ b/.config/quickshell/ii/modules/settings/InterfaceConfig.qml @@ -134,16 +134,16 @@ ContentPage { icon: "radio", value: "classic" }, - { - displayName: Translation.tr("Fill"), - icon: "stroke_full", - value: "fill" - }, { displayName: Translation.tr("Stroke"), icon: "stroke_partial", value: "stroke" }, + { + displayName: Translation.tr("Fill"), + icon: "stroke_full", + value: "fill" + }, { displayName: Translation.tr("Hide"), icon: "deselect",