From 398c508f994eed1d299ed28d4a01b60971033f72 Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Tue, 29 Apr 2025 10:56:44 +1000 Subject: refactor: bar clock use anchors --- modules/bar/components/Clock.qml | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'modules') 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 } } -- cgit v1.2.3-freya