From 60c303b771ed3e4063cdb857248b0d2bc3d9408f Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Tue, 26 Aug 2025 18:00:06 +0700 Subject: [PATCH] background: add padding for clock text in least busy region detection --- .../quickshell/ii/modules/background/Background.qml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.config/quickshell/ii/modules/background/Background.qml b/.config/quickshell/ii/modules/background/Background.qml index 06735f3a1..ae783d136 100644 --- a/.config/quickshell/ii/modules/background/Background.qml +++ b/.config/quickshell/ii/modules/background/Background.qml @@ -18,6 +18,8 @@ Variants { readonly property bool fixedClockPosition: Config.options.background.fixedClockPosition readonly property real fixedClockX: Config.options.background.clockX readonly property real fixedClockY: Config.options.background.clockY + readonly property real clockSizePadding: 20 + readonly property real screenSizePadding: 50 model: Quickshell.screens PanelWindow { @@ -115,10 +117,10 @@ Variants { function updateClockPosition() { // Somehow all this manual setting is needed to make the proc correctly use the new values leastBusyRegionProc.path = bgRoot.wallpaperPath - leastBusyRegionProc.contentWidth = clock.implicitWidth - leastBusyRegionProc.contentHeight = clock.implicitHeight - leastBusyRegionProc.horizontalPadding = bgRoot.movableXSpace + 100 - leastBusyRegionProc.verticalPadding = bgRoot.movableYSpace + 100 + leastBusyRegionProc.contentWidth = clock.implicitWidth + root.clockSizePadding * 2 + leastBusyRegionProc.contentHeight = clock.implicitHeight + root.clockSizePadding * 2 + leastBusyRegionProc.horizontalPadding = bgRoot.movableXSpace + root.screenSizePadding * 2 + leastBusyRegionProc.verticalPadding = bgRoot.movableYSpace + root.screenSizePadding * 2 leastBusyRegionProc.running = false; leastBusyRegionProc.running = true; }