From 6387d8400caf3fb4824969c8cdb90a9cf356822a Mon Sep 17 00:00:00 2001 From: bbedward Date: Fri, 14 Nov 2025 13:47:26 -0500 Subject: [PATCH] osd: account for bar position when on bottom --- quickshell/Widgets/DankOSD.qml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/quickshell/Widgets/DankOSD.qml b/quickshell/Widgets/DankOSD.qml index ee7ad69f..61b09a3a 100644 --- a/quickshell/Widgets/DankOSD.qml +++ b/quickshell/Widgets/DankOSD.qml @@ -75,7 +75,15 @@ PanelWindow { readonly property real alignedWidth: Theme.px(osdWidth, dpr) readonly property real alignedHeight: Theme.px(osdHeight, dpr) readonly property real alignedX: Theme.snap((screenWidth - alignedWidth) / 2, dpr) - readonly property real alignedY: Theme.snap(screenHeight - alignedHeight - Theme.spacingM, dpr) + readonly property real barOffsetWhenBottom: { + if (SettingsData.dankBarPosition === SettingsData.Position.Bottom && SettingsData.dankBarVisible) { + const widgetThickness = Math.max(20, 26 + SettingsData.dankBarInnerPadding * 0.6) + const effectiveBarThickness = Math.max(widgetThickness + SettingsData.dankBarInnerPadding + 4, Theme.barHeight - 4 - (8 - SettingsData.dankBarInnerPadding)) + return effectiveBarThickness + SettingsData.dankBarSpacing + SettingsData.dankBarBottomGap + } + return 0 + } + readonly property real alignedY: Theme.snap(screenHeight - alignedHeight - Theme.spacingM - barOffsetWhenBottom, dpr) anchors { top: true