1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-04-15 02:02:08 -04:00

clock: add analog seconds option for desktop widget

This commit is contained in:
bbedward
2025-12-17 14:04:14 -05:00
parent 523ccc6bf8
commit 53553c1f62
4 changed files with 15 additions and 0 deletions

View File

@@ -413,6 +413,7 @@ Singleton {
property color desktopClockCustomColor: "#ffffff" property color desktopClockCustomColor: "#ffffff"
property bool desktopClockShowDate: true property bool desktopClockShowDate: true
property bool desktopClockShowAnalogNumbers: false property bool desktopClockShowAnalogNumbers: false
property bool desktopClockShowAnalogSeconds: true
property real desktopClockX: -1 property real desktopClockX: -1
property real desktopClockY: -1 property real desktopClockY: -1
property real desktopClockWidth: 280 property real desktopClockWidth: 280

View File

@@ -309,6 +309,7 @@ var SPEC = {
desktopClockCustomColor: { def: "#ffffff" }, desktopClockCustomColor: { def: "#ffffff" },
desktopClockShowDate: { def: true }, desktopClockShowDate: { def: true },
desktopClockShowAnalogNumbers: { def: false }, desktopClockShowAnalogNumbers: { def: false },
desktopClockShowAnalogSeconds: { def: true },
desktopClockX: { def: -1 }, desktopClockX: { def: -1 },
desktopClockY: { def: -1 }, desktopClockY: { def: -1 },
desktopClockWidth: { def: 280 }, desktopClockWidth: { def: 280 },

View File

@@ -192,6 +192,8 @@ Item {
Rectangle { Rectangle {
id: secondDot id: secondDot
visible: SettingsData.desktopClockShowAnalogSeconds
property real angle: analogRoot.seconds * 6 * Math.PI / 180 property real angle: analogRoot.seconds * 6 * Math.PI / 180
property real orbitRadius: analogRoot.faceRadius * 0.92 property real orbitRadius: analogRoot.faceRadius * 0.92

View File

@@ -87,6 +87,17 @@ Item {
onToggled: checked => SettingsData.set("desktopClockShowAnalogNumbers", checked) onToggled: checked => SettingsData.set("desktopClockShowAnalogNumbers", checked)
} }
SettingsDivider {
visible: SettingsData.desktopClockStyle === "analog"
}
SettingsToggleRow {
visible: SettingsData.desktopClockStyle === "analog"
text: I18n.tr("Show Seconds")
checked: SettingsData.desktopClockShowAnalogSeconds
onToggled: checked => SettingsData.set("desktopClockShowAnalogSeconds", checked)
}
SettingsDivider {} SettingsDivider {}
SettingsToggleRow { SettingsToggleRow {