mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-24 13:32:50 -05:00
clock: add analog seconds option for desktop widget
This commit is contained in:
@@ -413,6 +413,7 @@ Singleton {
|
||||
property color desktopClockCustomColor: "#ffffff"
|
||||
property bool desktopClockShowDate: true
|
||||
property bool desktopClockShowAnalogNumbers: false
|
||||
property bool desktopClockShowAnalogSeconds: true
|
||||
property real desktopClockX: -1
|
||||
property real desktopClockY: -1
|
||||
property real desktopClockWidth: 280
|
||||
|
||||
@@ -309,6 +309,7 @@ var SPEC = {
|
||||
desktopClockCustomColor: { def: "#ffffff" },
|
||||
desktopClockShowDate: { def: true },
|
||||
desktopClockShowAnalogNumbers: { def: false },
|
||||
desktopClockShowAnalogSeconds: { def: true },
|
||||
desktopClockX: { def: -1 },
|
||||
desktopClockY: { def: -1 },
|
||||
desktopClockWidth: { def: 280 },
|
||||
|
||||
@@ -192,6 +192,8 @@ Item {
|
||||
|
||||
Rectangle {
|
||||
id: secondDot
|
||||
visible: SettingsData.desktopClockShowAnalogSeconds
|
||||
|
||||
property real angle: analogRoot.seconds * 6 * Math.PI / 180
|
||||
property real orbitRadius: analogRoot.faceRadius * 0.92
|
||||
|
||||
|
||||
@@ -87,6 +87,17 @@ Item {
|
||||
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 {}
|
||||
|
||||
SettingsToggleRow {
|
||||
|
||||
Reference in New Issue
Block a user