From 7137c24b203460cb93699da4ea40a1f227df4684 Mon Sep 17 00:00:00 2001 From: Diyou Date: Tue, 19 Mar 2024 17:47:39 +0100 Subject: [PATCH] Fixed Layout to automatically recenter --- package/contents/ui/main.qml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/package/contents/ui/main.qml b/package/contents/ui/main.qml index 58e342e..69dd117 100644 --- a/package/contents/ui/main.qml +++ b/package/contents/ui/main.qml @@ -45,6 +45,8 @@ PlasmoidItem { } fullRepresentation: ColumnLayout { + width: childrenRect.width + 20 + height: childrenRect.height + 20 anchors.fill: parent spacing: -20 @@ -68,7 +70,7 @@ PlasmoidItem { Item { width: Math.max(textMetricsClockLabel.width, textMetricsDayLabel.width) height: Math.max(textMetricsClockLabel.height, textMetricsDayLabel.height) - Layout.alignment: Qt.AlignCenter + Layout.alignment: Qt.AlignHCenter Text { id: clockLabel @@ -129,7 +131,7 @@ PlasmoidItem { Text { id: dateLabel visible: plasmoid.configuration.showDateDisplay - Layout.alignment: Qt.AlignCenter + Layout.alignment: Qt.AlignHCenter text: Qt.formatDate(currentDateTime, plasmoid.configuration.dateCustomDateFormat)