From eeb49c5aff4fa4c9fcb825d7e3114852956dd2f5 Mon Sep 17 00:00:00 2001 From: Gabriel Brown Date: Wed, 19 Aug 2026 11:23:05 -0400 Subject: [PATCH] Hang the control center under the bar instead of below it The panel opened 38 pixels beneath the bar while its own comment said two. margins.top added Theme.barHeight to the gap, but an exclusiveZone of 0 means "reserve nothing, respect what others reserved" -- so the surface already began below the bar's 36px zone and the bar height was counted twice. The margin is now the gap alone, which also means the panel follows the bar: if the bar ever stops reserving space, this closes up against the top edge rather than hanging under nothing. Measured before and after against hyprctl layers: bar bottom at y=36, panel top from y=74 to y=38. Claude-Session: https://claude.ai/code/session_01BRvzt4H8XXLPVH5MyYdk9L --- .../quickshell/modules/quicksettings/QuickSettings.qml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/config/dot/quickshell/modules/quicksettings/QuickSettings.qml b/config/dot/quickshell/modules/quicksettings/QuickSettings.qml index 2da8c02..edfe806 100644 --- a/config/dot/quickshell/modules/quicksettings/QuickSettings.qml +++ b/config/dot/quickshell/modules/quicksettings/QuickSettings.qml @@ -20,9 +20,17 @@ PanelWindow { // Hangs directly beneath the top-right status cluster. Two logical pixels // preserve the Prism edge without making the surface feel detached. + // + // The margin is the gap ALONE, not the bar height plus the gap. An + // exclusiveZone of 0 means "reserve nothing, but respect what others + // reserved", so this surface already begins below the bar's 36px zone; + // adding the bar height here counted it twice and left the panel floating + // 38px under the bar instead of 2px. It also means the panel follows the + // bar on its own -- if the bar ever stops reserving space, this closes up + // against the top edge rather than hanging under nothing. anchors.top: true anchors.right: true - margins.top: Theme.barHeight + Theme.controlCenterTopGap + margins.top: Theme.controlCenterTopGap margins.right: Theme.barSideMargin exclusiveZone: 0