diff --git a/.config/quickshell/ii/modules/background/Background.qml b/.config/quickshell/ii/modules/background/Background.qml index 28f8028de..eca001d2a 100644 --- a/.config/quickshell/ii/modules/background/Background.qml +++ b/.config/quickshell/ii/modules/background/Background.qml @@ -332,7 +332,7 @@ Variants { Loader { id: cookieClockLoader - visible: root.clockStyle === "cookie" + visible: root.clockStyle === "cookie" || root.clockStyle === "simpler-cookie" active: visible sourceComponent: CookieClock {} } diff --git a/.config/quickshell/ii/modules/background/CookieClock.qml b/.config/quickshell/ii/modules/background/CookieClock.qml index 0e1474543..ce9c5c31a 100644 --- a/.config/quickshell/ii/modules/background/CookieClock.qml +++ b/.config/quickshell/ii/modules/background/CookieClock.qml @@ -13,11 +13,13 @@ import Qt5Compat.GraphicalEffects Item { id: root + readonly property string clockStyle: Config.options.background.clock.style + property real implicitSize: 230 property real hourHandLength: 72 - property real hourHandWidth: 16 + property real hourHandWidth: 20 property real minuteHandLength: 95 - property real minuteHandWidth: 8 + property real minuteHandWidth: clockStyle === "simpler-cookie" ? hourHandWidth : 12 property real centerDotSize: 10 property real hourDotSize: minuteHandWidth @@ -31,6 +33,7 @@ Item { readonly property list clockNumbers: DateTime.time.split(/[: ]/) readonly property int clockHour: parseInt(clockNumbers[0]) % 12 readonly property int clockMinute: parseInt(clockNumbers[1]) + implicitWidth: implicitSize implicitHeight: implicitSize @@ -50,15 +53,17 @@ Item { z: 0 implicitSize: root.implicitSize amplitude: implicitSize / 70 - sides: 12 + sides: Config.options.background.clock.clockSides color: root.colBackground // 12 dots around the cookie Repeater { + model: 12 Item { + visible: clockStyle === "simpler-cookie" ? false : true required property int index - rotation: 360 / 12 * index + rotation: 360 / 12 * index anchors.fill: parent Rectangle { anchors { @@ -81,6 +86,7 @@ Item { z: 1 anchors.centerIn: cookie spacing: -16 + visible: false // LOOK // Numbers Repeater { @@ -132,6 +138,7 @@ Item { // Center dot Rectangle { + visible: clockStyle === "simpler-cookie" ? false : true z: 4 color: root.colOnHourHand anchors.centerIn: parent diff --git a/.config/quickshell/ii/modules/common/Config.qml b/.config/quickshell/ii/modules/common/Config.qml index ea99949d5..93c6c3430 100644 --- a/.config/quickshell/ii/modules/common/Config.qml +++ b/.config/quickshell/ii/modules/common/Config.qml @@ -127,8 +127,9 @@ Singleton { property real x: -500 property real y: -500 property bool show: true - property string style: "cookie" // Options: "cookie", "digital" + property string style: "cookie" // Options: "cookie", "digital", "simpler-cookie" property real scale: 1 + property int clockSides: 12 } property string wallpaperPath: "" property string thumbnailPath: "" diff --git a/.config/quickshell/ii/modules/settings/InterfaceConfig.qml b/.config/quickshell/ii/modules/settings/InterfaceConfig.qml index 76bd43b93..060cc3fac 100644 --- a/.config/quickshell/ii/modules/settings/InterfaceConfig.qml +++ b/.config/quickshell/ii/modules/settings/InterfaceConfig.qml @@ -20,6 +20,7 @@ ContentPage { } } + ConfigSpinBox { text: Translation.tr("Scale (%)") value: Config.options.background.clock.scale * 100 @@ -31,6 +32,17 @@ ContentPage { } } + ConfigSpinBox { + text: Translation.tr("Clock sides") + value: Config.options.background.clock.clockSides + from: 1 + to: 36 + stepSize: 1 + onValueChanged: { + Config.options.background.clock.clockSides = value; + } + } + ContentSubsection { title: Translation.tr("Clock style") ConfigSelectionArray { @@ -49,6 +61,11 @@ ContentPage { icon: "cookie", value: "cookie" }, + { + displayName: Translation.tr("Material simpler cookie"), + icon: "cookie", + value: "simpler-cookie" + }, ] } }