From fbffa410afba1079df09dfd40652bfdf7da71cf4 Mon Sep 17 00:00:00 2001 From: bbedward Date: Fri, 4 Sep 2026 11:50:32 -0400 Subject: [PATCH] clock: align the horizontal time block to whole pixels fixes #3291 port 1.6 --- quickshell/Modules/DankBar/Widgets/Clock.qml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/quickshell/Modules/DankBar/Widgets/Clock.qml b/quickshell/Modules/DankBar/Widgets/Clock.qml index b3ea4284e..c0addd90c 100644 --- a/quickshell/Modules/DankBar/Widgets/Clock.qml +++ b/quickshell/Modules/DankBar/Widgets/Clock.qml @@ -204,7 +204,7 @@ BasePill { spacing: Theme.spacingS property real fontSize: Theme.barTextSize(root.barThickness, root.barConfig?.fontScale, root.barConfig?.maximizeWidgetText) - property real digitWidth: fontSize * 0.6 + property real digitWidth: Math.round(fontSize * 0.6) property string hoursStr: { const hours = systemClock?.date?.getHours() ?? 0; @@ -234,6 +234,8 @@ BasePill { text: "•" font.pixelSize: Theme.fontSizeSmall color: Theme.outlineButton + width: Math.ceil(implicitWidth) + horizontalAlignment: Text.AlignHCenter anchors.verticalCenter: parent.verticalCenter visible: !compact } @@ -272,6 +274,8 @@ BasePill { text: ":" font.pixelSize: clockRow.fontSize color: Theme.widgetTextColor + width: Math.ceil(implicitWidth) + horizontalAlignment: Text.AlignHCenter } StyledText { @@ -295,6 +299,8 @@ BasePill { text: ":" font.pixelSize: clockRow.fontSize color: Theme.widgetTextColor + width: Math.ceil(implicitWidth) + horizontalAlignment: Text.AlignHCenter } StyledText { @@ -320,6 +326,8 @@ BasePill { text: clockRow.ampmStr font.pixelSize: clockRow.fontSize color: Theme.widgetTextColor + width: Math.ceil(implicitWidth) + horizontalAlignment: Text.AlignHCenter } } } @@ -337,6 +345,8 @@ BasePill { } font.pixelSize: clockRow.fontSize color: Theme.widgetTextColor + width: Math.ceil(implicitWidth) + horizontalAlignment: Text.AlignHCenter anchors.verticalCenter: parent.verticalCenter visible: !compact }