[PATCH] Only resize width to fit date elements if they are visible
authorNiccolò Venerandi <niccolo@venerandi.com>
Tue, 17 Jun 2025 07:39:05 +0000 (09:39 +0200)
committerAurélien COUDERC <coucouf@debian.org>
Mon, 21 Jul 2025 16:21:10 +0000 (18:21 +0200)
BUG:505614

Gbp-Pq: Name upstream_b2e80af5_Only-resize-width-to-fit-date-elements-if-they-are-visible.patch

applets/digital-clock/package/contents/ui/DigitalClock.qml

index 602f6724da9fe59cb04a7b73606e7517abbdd4b8..14917649311a0339f9b27846bdc85d8ab17fbdfc 100644 (file)
@@ -249,7 +249,7 @@ MouseArea {
                 target: contentItem
 
                 height: sizehelper.height
-                width: dateLabel.width + labelsGrid.width + timeMetrics.advanceWidth(" ") * 2 + separator.width
+                width: (dateLabel.visible ? dateLabel.width + timeMetrics.advanceWidth(" ") * 2 + separator.width : 0) + labelsGrid.width
             }
 
             AnchorChanges {