From 68ea59328eadef1659ce6da1f93e55b4d51fae42 Mon Sep 17 00:00:00 2001 From: darksignal7 Date: Tue, 7 Oct 2025 21:46:40 +0300 Subject: [PATCH] change 'rotating' dateStyle radius, fix bubble dateStyle --- .../cookieClock/dateIndicators/BubbleDate.qml | 2 +- .../dateIndicators/DateIndicator.qml | 18 +++++++----------- .../dateIndicators/RectangleDate.qml | 2 -- .../dateIndicators/RotatingDate.qml | 9 +++++++-- 4 files changed, 15 insertions(+), 16 deletions(-) diff --git a/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/BubbleDate.qml b/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/BubbleDate.qml index 41c8ca85e..7479574ac 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/BubbleDate.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/BubbleDate.qml @@ -11,7 +11,7 @@ Item { MaterialCookie { z: 5 - sides: 4 + sides: bubbleIndex === 0 ? 4 : 1 anchors.centerIn: parent color: bubbleIndex === 0.0 ? Appearance.colors.colPrimaryContainer : Appearance.colors.colTertiaryContainer implicitSize: root.style === "bubble" ? root.dateSquareSize : 0 diff --git a/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/DateIndicator.qml b/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/DateIndicator.qml index 465a5751e..3e96dae05 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/DateIndicator.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/DateIndicator.qml @@ -16,11 +16,6 @@ Item { // Rotating date Loader { - opacity: root.style === "rotating" ? 1.0 : 0 - Behavior on opacity { - animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) - } - anchors.fill: parent active: opacity > 0 sourceComponent: RotatingDate {} @@ -39,17 +34,19 @@ Item { } active: height > 0 - sourceComponent: RectangleDate {} - anchors { verticalCenter: parent.verticalCenter right: parent.right rightMargin: 10 } - + + sourceComponent: RectangleDate { + color: root.colBackground + radius: Appearance.rounding.small + } } - // Date bubble style day + // Date bubble / day Loader { property real targetSize: root.style === "bubble" ? root.dateSquareSize : 0 Behavior on targetSize { @@ -70,7 +67,7 @@ Item { } } - // Date bubble month + // Date bubble / month Loader { property real targetSize: root.style === "bubble" ? root.dateSquareSize : 0 Behavior on targetSize { @@ -80,7 +77,6 @@ Item { width: targetSize height: targetSize active: targetSize > 0 - anchors { right: parent.right diff --git a/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/RectangleDate.qml b/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/RectangleDate.qml index a96e9ba07..ac9e63bbc 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/RectangleDate.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/RectangleDate.qml @@ -8,8 +8,6 @@ import QtQuick Rectangle { z: 1 - color: root.colBackground - radius: Appearance.rounding.small StyledText { opacity: root.style === "rect" ? 1.0 : 0 Behavior on opacity { diff --git a/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/RotatingDate.qml b/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/RotatingDate.qml index 70e282324..96c39fe5a 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/RotatingDate.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/dateIndicators/RotatingDate.qml @@ -8,19 +8,24 @@ import QtQuick Canvas { z: 0 + + opacity: root.style === "rotating" ? 1.0 : 0 + Behavior on opacity { + animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) + } + rotation: { if (!Config.options.time.secondPrecision) return 0; return (secondHandLoader.item.rotation + 45); // +45 degrees to align text's center } - onPaint: { var ctx = getContext("2d"); ctx.clearRect(0, 0, width, height); ctx.font = "700 30px " + Appearance.font.family.title; var text = Qt.locale().toString(DateTime.clock.date, "ddd dd"); - var radius = 78; + var radius = 65; var angleStep = Math.PI / 2.35 / text.length; for (var i = 0; i < text.length; i++) {