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
This commit is contained in:
Gabriel Brown
2026-08-19 11:23:05 -04:00
parent 8e93f08977
commit eeb49c5aff
@@ -20,9 +20,17 @@ PanelWindow {
// Hangs directly beneath the top-right status cluster. Two logical pixels // Hangs directly beneath the top-right status cluster. Two logical pixels
// preserve the Prism edge without making the surface feel detached. // 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.top: true
anchors.right: true anchors.right: true
margins.top: Theme.barHeight + Theme.controlCenterTopGap margins.top: Theme.controlCenterTopGap
margins.right: Theme.barSideMargin margins.right: Theme.barSideMargin
exclusiveZone: 0 exclusiveZone: 0