diff --git a/.config/quickshell/ii/modules/background/cookieClock/CookieClock.qml b/.config/quickshell/ii/modules/background/cookieClock/CookieClock.qml index efb034609..22f654dd0 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/CookieClock.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/CookieClock.qml @@ -72,6 +72,11 @@ Item { // Hour/minutes numbers/dots/lines MinuteMarks { anchors.fill: parent + property int hourDotSize: root.hourDotSize + property int hourNumberSize: root.hourNumberSize + property int hourLineSize: root.hourLineSize + property int minuteLineSize: root.minuteLineSize + color: root.colOnBackground } HourMarks { anchors.centerIn: parent diff --git a/.config/quickshell/ii/modules/background/cookieClock/DateIndicator.qml b/.config/quickshell/ii/modules/background/cookieClock/DateIndicator.qml index 0704fb870..f16f0c0cb 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/DateIndicator.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/DateIndicator.qml @@ -16,8 +16,7 @@ Item { Canvas { z: 0 - width: parent.width - height: parent.height + anchors.fill: parent rotation: { if (!Config.options.time.secondPrecision) return 0; return (secondHandLoader.item.rotation + 45); // +45 degrees to align text's center diff --git a/.config/quickshell/ii/modules/background/cookieClock/MinuteMarks.qml b/.config/quickshell/ii/modules/background/cookieClock/MinuteMarks.qml index af29f426d..1ecb422e0 100644 --- a/.config/quickshell/ii/modules/background/cookieClock/MinuteMarks.qml +++ b/.config/quickshell/ii/modules/background/cookieClock/MinuteMarks.qml @@ -8,11 +8,20 @@ import qs.modules.common.functions import QtQuick Item { + id: root + + property int hourDotSize: 16 + property int hourNumberSize: 80 + property int hourLineSize: 8 + property int minuteLineSize: 4 + property color color: Appearance.colors.colOnSecondaryContainer + property string style: Config.options.background.clock.cookie.dialNumberStyle // "dots", "numbers", "full", "hide" + Repeater { model: 12 Item { required property int index - opacity: Config.options.background.clock.cookie.dialNumberStyle === "dots" ? 1.0 : 0 + opacity: root.style === "dots" ? 1.0 : 0 rotation: 360 / 12 * index anchors.fill: parent Behavior on opacity { @@ -22,7 +31,7 @@ Item { anchors { left: parent.left verticalCenter: parent.verticalCenter - leftMargin: Config.options.background.clock.cookie.dialNumberStyle === "dots" ? 10 : 50 + leftMargin: root.style === "dots" ? 10 : 50 } Behavior on anchors.leftMargin { animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) @@ -30,7 +39,7 @@ Item { implicitWidth: root.hourDotSize implicitHeight: implicitWidth radius: implicitWidth / 2 - color: root.colOnBackground + color: root.color opacity: 0.5 } } @@ -41,7 +50,7 @@ Item { model: 4 Item { required property int index - opacity: Config.options.background.clock.cookie.dialNumberStyle === "numbers" ? 1.0 : 0 + opacity: root.style === "numbers" ? 1.0 : 0 rotation: 360 / 4 * index anchors.fill: parent Behavior on opacity { @@ -54,13 +63,13 @@ Item { anchors { left: parent.left verticalCenter: parent.verticalCenter - leftMargin: Config.options.background.clock.cookie.dialNumberStyle === "numbers" ? 32 : 96 + leftMargin: root.style === "numbers" ? 32 : 96 } Behavior on anchors.leftMargin { animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) } StyledText { - color: root.colOnBackground + color: root.color anchors.centerIn: parent text: index === 0 ? "9" : index === 1 ? "12" : @@ -83,7 +92,7 @@ Item { required property int index rotation: 360 / 12 * index anchors.fill: parent - opacity: Config.options.background.clock.cookie.dialNumberStyle === "full" ? 1.0 : 0 + opacity: root.style === "full" ? 1.0 : 0 Behavior on opacity { animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) } @@ -91,11 +100,11 @@ Item { implicitWidth: root.hourLineSize * 3.5 implicitHeight: root.hourLineSize radius: implicitWidth / 2 - color: root.colOnBackground + color: root.color anchors { left: parent.left verticalCenter: parent.verticalCenter - leftMargin: Config.options.background.clock.cookie.dialNumberStyle === "full" ? 10 : 50 + leftMargin: root.style === "full" ? 10 : 50 } Behavior on anchors.leftMargin { animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) @@ -110,7 +119,7 @@ Item { required property int index rotation: 360 / 60 * index anchors.fill: parent - opacity: Config.options.background.clock.cookie.dialNumberStyle === "full" ? 1.0 : 0 + opacity: root.style === "full" ? 1.0 : 0 Behavior on opacity { animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) } @@ -118,12 +127,12 @@ Item { implicitWidth: root.minuteLineSize * 3.5 implicitHeight: root.minuteLineSize radius: implicitWidth / 2 - color: root.colOnBackground + color: root.color opacity: 0.5 anchors { left: parent.left verticalCenter: parent.verticalCenter - leftMargin: Config.options.background.clock.cookie.dialNumberStyle === "full" ? 10 : 50 + leftMargin: root.style === "full" ? 10 : 50 } Behavior on anchors.leftMargin { animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) diff --git a/.config/quickshell/ii/modules/common/Config.qml b/.config/quickshell/ii/modules/common/Config.qml index 5efc2a1ec..72e5ee721 100644 --- a/.config/quickshell/ii/modules/common/Config.qml +++ b/.config/quickshell/ii/modules/common/Config.qml @@ -131,11 +131,11 @@ Singleton { property real scale: 1 property int clockSides: 12 property JsonObject cookie: JsonObject { - property string dialNumberStyle: "dots" // Options: "dots" , "numbers", "full" , "none" - property string hourHandStyle: "fill" // Options: "classic", "fill", "stroke", "hide" - property string minuteHandStyle: "medium" // Options: "classic", "thin", "medium", "bold", "hide" - property string secondHandStyle: "dot" // Options: "dot", "line" , "none" - property string dateStyle: "rotating" // Options: "rotating", "rect", "bubble" , "none" + property string dialNumberStyle: "dots" // Options: "dots" , "numbers", "full" , "none" + property string hourHandStyle: "fill" // Options: "classic", "fill", "stroke", "hide" + property string minuteHandStyle: "medium" // Options "classic", "thin", "medium", "bold", "hide" + property string secondHandStyle: "dot" // Options: "dot", "line" , "none" + property string dateStyle: "rotating" // Options: "rotating", "rect", "bubble" , "none" property bool timeIndicators: true property bool hourMarks: true property bool dateInClock: true diff --git a/.config/quickshell/ii/modules/settings/InterfaceConfig.qml b/.config/quickshell/ii/modules/settings/InterfaceConfig.qml index 430ec6c40..273948d7d 100644 --- a/.config/quickshell/ii/modules/settings/InterfaceConfig.qml +++ b/.config/quickshell/ii/modules/settings/InterfaceConfig.qml @@ -58,7 +58,7 @@ ContentPage { ContentSubsection { visible: Config.options.background.clock.style === "cookie" - title: Translation.tr("Dial number style") + title: Translation.tr("Dial numbers style") ConfigSelectionArray { currentValue: Config.options.background.clock.cookie.dialNumberStyle onSelected: newValue => {