forked from Shinonome/dots-hyprland
make time correct after waking up from suspend (fixes #1905)
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
import qs
|
||||||
import qs.modules.common
|
import qs.modules.common
|
||||||
import QtQuick
|
import QtQuick
|
||||||
import Quickshell
|
import Quickshell
|
||||||
@@ -11,7 +12,7 @@ pragma ComponentBehavior: Bound
|
|||||||
Singleton {
|
Singleton {
|
||||||
property var clock: SystemClock {
|
property var clock: SystemClock {
|
||||||
id: clock
|
id: clock
|
||||||
precision: SystemClock.Minutes
|
precision: GlobalStates.screenLocked ? SystemClock.Seconds : SystemClock.Minutes // Hack to ensure clock is correct after waking up from suspend
|
||||||
}
|
}
|
||||||
property string time: Qt.locale().toString(clock.date, Config.options?.time.format ?? "hh:mm")
|
property string time: Qt.locale().toString(clock.date, Config.options?.time.format ?? "hh:mm")
|
||||||
property string shortDate: Qt.locale().toString(clock.date, Config.options?.time.shortDateFormat ?? "dd/MM")
|
property string shortDate: Qt.locale().toString(clock.date, Config.options?.time.shortDateFormat ?? "dd/MM")
|
||||||
|
|||||||
Reference in New Issue
Block a user