summaryrefslogtreecommitdiff
path: root/widgets/DesktopClock.qml
diff options
context:
space:
mode:
authorKaj <kajgiesbers@hotmail.com>2025-07-21 16:17:23 +0200
committerGitHub <noreply@github.com>2025-07-22 00:17:23 +1000
commit3e3e98b340fc462cdc5ba4fb0f4ac09f94a68cd8 (patch)
treed8c84d2d9110bdc7f3e38456136a1e6e24f39060 /widgets/DesktopClock.qml
parenticons: fix quoting issues (diff)
downloadcaelestia-shell-3e3e98b340fc462cdc5ba4fb0f4ac09f94a68cd8.tar.gz
caelestia-shell-3e3e98b340fc462cdc5ba4fb0f4ac09f94a68cd8.tar.bz2
caelestia-shell-3e3e98b340fc462cdc5ba4fb0f4ac09f94a68cd8.zip
feat: add a simple desktop clock (#238)
* Adds a simple desktop clock * Adds ability to change color * Sets the desktop clock to be disabled by default * Improves desktop clock code based on feedback * Disable the clock by default * Fixes config of background clock * Removes the timer for the desktop clock --------- Co-authored-by: Kaj Giesbers <kajgiesbers@gmail.com>
Diffstat (limited to 'widgets/DesktopClock.qml')
-rw-r--r--widgets/DesktopClock.qml20
1 files changed, 20 insertions, 0 deletions
diff --git a/widgets/DesktopClock.qml b/widgets/DesktopClock.qml
new file mode 100644
index 0000000..30e4fc4
--- /dev/null
+++ b/widgets/DesktopClock.qml
@@ -0,0 +1,20 @@
+import QtQuick
+import QtQuick.Controls
+import qs.config
+import qs.services
+import qs.widgets
+
+Item {
+ id: clockRoot
+ width: timeText.implicitWidth + Appearance.padding.large * 2
+ height: timeText.implicitHeight + Appearance.padding.large * 2
+
+
+ StyledText {
+ id: timeText
+ anchors.centerIn: parent
+ font.pointSize: Appearance.font.size.extraLarge
+ font.bold: true
+ text: Time.format("hh:mm:ss");
+ }
+}