diff --git a/settings/quickshell.nix b/settings/quickshell.nix index 5e80502..a75cb83 100644 --- a/settings/quickshell.nix +++ b/settings/quickshell.nix @@ -2108,7 +2108,28 @@ in id: contextMenu property var trayItem: null fullWidth: menuItems.width + 2 * Theme.panelGap - fullHeight: menuItems.height + 2 * Theme.panelGap + + // While a freshly assigned menu is still loading, the Card + // is empty — and an empty Card is not height 0, it is + // 2*cardPad — so the panel would morph DOWN to a stub and + // then regrow once the items land, instead of moving + // across. Hold the last loaded height until the new items + // arrive so the morph stays continuous. The correction is + // small, and nil when it is the same menu as last time. + readonly property bool menuLoaded: + menuOpener.children && menuOpener.children.values.length > 0 + property real lastMenuHeight: 0 + fullHeight: (menuLoaded ? menuItems.height + : Math.max(menuItems.height, lastMenuHeight)) + + 2 * Theme.panelGap + + Connections { + target: menuItems + function onHeightChanged() { + if (contextMenu.menuLoaded) + contextMenu.lastMenuHeight = menuItems.height; + } + } // Deliberately NOT cleared on close. Nulling the menu threw // away the loaded items, and the only thing that refills diff --git a/settings/ui.nix b/settings/ui.nix index c05bd47..8069cf1 100644 --- a/settings/ui.nix +++ b/settings/ui.nix @@ -12,5 +12,5 @@ # Theme.radiusTiny = radius * 0.5 # hyprland decoration.rounding = radius { - radius = 24; + radius = 20; }