mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-27 06:52:50 -05:00
fix lock screen clock
This commit is contained in:
@@ -80,6 +80,11 @@ Item {
|
|||||||
opacity: 0.4
|
opacity: 0.4
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SystemClock {
|
||||||
|
id: systemClock
|
||||||
|
precision: SystemClock.Seconds
|
||||||
|
}
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
@@ -95,24 +100,13 @@ Item {
|
|||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
text: SettingsData.use24HourClock ? Qt.formatTime(
|
text: SettingsData.use24HourClock ? Qt.formatTime(
|
||||||
new Date(),
|
systemClock.date,
|
||||||
"H:mm") : Qt.formatTime(
|
"H:mm") : Qt.formatTime(
|
||||||
new Date(), "h:mm AP")
|
systemClock.date, "h:mm AP")
|
||||||
font.pixelSize: 120
|
font.pixelSize: 120
|
||||||
font.weight: Font.Light
|
font.weight: Font.Light
|
||||||
color: "white"
|
color: "white"
|
||||||
lineHeight: 0.8
|
lineHeight: 0.8
|
||||||
|
|
||||||
Timer {
|
|
||||||
interval: 1000
|
|
||||||
running: true
|
|
||||||
repeat: true
|
|
||||||
onTriggered: parent.text = SettingsData.use24HourClock ? Qt.formatTime(
|
|
||||||
new Date(),
|
|
||||||
"H:mm") : Qt.formatTime(
|
|
||||||
new Date(),
|
|
||||||
"h:mm AP")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
StyledText {
|
StyledText {
|
||||||
|
|||||||
Reference in New Issue
Block a user