splitted the code base into more components and implemented safety measures to Crypto.qml, also added missing themes and removed hardcoded values
This commit is contained in:
@@ -17,8 +17,6 @@ PanelWindow {
|
||||
WlrLayershell.exclusiveZone: -1
|
||||
mask: Region {}
|
||||
|
||||
TimezoneProvider { id: timezone }
|
||||
|
||||
property string fullDateString: ""
|
||||
property int typedChars: 0
|
||||
property string secondsString: ""
|
||||
@@ -31,14 +29,14 @@ PanelWindow {
|
||||
|
||||
function updateDate(d) {
|
||||
let now = d || new Date()
|
||||
fullDateString = timezone.toTz(now).toLocaleDateString(Qt.locale(),
|
||||
fullDateString = TimezoneProvider.toTz(now).toLocaleDateString(Qt.locale(),
|
||||
Cfg.Config.dateFormat === "DMY" ? "dddd, d MMMM yyyy" : "dddd, MMMM d, yyyy")
|
||||
startTyping()
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
let d = new Date()
|
||||
secondsString = Qt.formatTime(timezone.toTz(d), "hh:mm:ss")
|
||||
secondsString = Qt.formatTime(TimezoneProvider.toTz(d), "hh:mm:ss")
|
||||
updateDate(d)
|
||||
}
|
||||
|
||||
@@ -106,7 +104,7 @@ PanelWindow {
|
||||
repeat: true
|
||||
onTriggered: {
|
||||
let d = new Date()
|
||||
let tzd = timezone.toTz(d)
|
||||
let tzd = TimezoneProvider.toTz(d)
|
||||
secondsString = Qt.formatTime(tzd, "hh:mm:ss")
|
||||
if (tzd.getHours() === 0 && tzd.getMinutes() === 0 && tzd.getSeconds() === 0)
|
||||
updateDate(d)
|
||||
|
||||
Reference in New Issue
Block a user