diff options
Diffstat (limited to 'modules/background')
| -rw-r--r-- | modules/background/Background.qml | 9 | ||||
| -rw-r--r-- | modules/background/DesktopClock.qml | 18 |
2 files changed, 25 insertions, 2 deletions
diff --git a/modules/background/Background.qml b/modules/background/Background.qml index 1c18786..a28f1dd 100644 --- a/modules/background/Background.qml +++ b/modules/background/Background.qml @@ -2,6 +2,7 @@ import qs.widgets import qs.config import Quickshell import Quickshell.Wayland +import QtQuick LazyLoader { activeAsync: Config.background.enabled @@ -27,11 +28,15 @@ LazyLoader { Wallpaper {} - DesktopClock { - visible: Config.background.desktopClock.enabled + Loader { anchors.right: parent.right anchors.bottom: parent.bottom anchors.margins: Appearance.padding.large + + active: Config.background.desktopClock.enabled + asynchronous: true + + source: "DesktopClock.qml" } } } diff --git a/modules/background/DesktopClock.qml b/modules/background/DesktopClock.qml new file mode 100644 index 0000000..380e65a --- /dev/null +++ b/modules/background/DesktopClock.qml @@ -0,0 +1,18 @@ +import qs.widgets +import qs.services +import qs.config +import QtQuick + +Item { + implicitWidth: timeText.implicitWidth + Appearance.padding.large * 2 + implicitHeight: timeText.implicitHeight + Appearance.padding.large * 2 + + StyledText { + id: timeText + + anchors.centerIn: parent + text: Time.format("hh:mm:ss") + font.pointSize: Appearance.font.size.extraLarge + font.bold: true + } +} |