summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-04-29 10:56:44 +1000
committer2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-04-29 10:56:44 +1000
commit398c508f994eed1d299ed28d4a01b60971033f72 (patch)
tree952806ca2bcc2b18d5b86055aa18e0d915419b41
parentbar: fix alignment (diff)
downloadcaelestia-shell-398c508f994eed1d299ed28d4a01b60971033f72.tar.gz
caelestia-shell-398c508f994eed1d299ed28d4a01b60971033f72.tar.bz2
caelestia-shell-398c508f994eed1d299ed28d4a01b60971033f72.zip
refactor: bar clock use anchors
-rw-r--r--modules/bar/components/Clock.qml14
1 files changed, 6 insertions, 8 deletions
diff --git a/modules/bar/components/Clock.qml b/modules/bar/components/Clock.qml
index 49ef103..9743be4 100644
--- a/modules/bar/components/Clock.qml
+++ b/modules/bar/components/Clock.qml
@@ -4,27 +4,25 @@ import "root:/config"
import QtQuick
import QtQuick.Layouts
-BoxLayout {
+StyledRect {
id: root
readonly property color colour: Appearance.colours.peach
- padding: [Appearance.padding.smaller, 0]
-
MaterialIcon {
+ id: icon
+
text: "calendar_month"
color: root.colour
-
- Layout.alignment: Layout.Center
}
- StyledText {
+ AnchorText {
+ prevAnchor: icon
+
horizontalAlignment: StyledText.AlignHCenter
text: root.vertical ? Time.format("hh\nmm") : Time.format("dd/MM/yy hh:mm")
font.pointSize: Appearance.font.size.smaller
font.family: Appearance.font.family.mono
color: root.colour
-
- Layout.alignment: Layout.Center
}
}