quickshell: session and launcher panels expand from a point like the dropdowns

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
rope 2026-06-12 20:10:20 +01:00
parent be330a0c6d
commit 715ccdd4ae

View file

@ -388,10 +388,17 @@ in
id: sessionMenu id: sessionMenu
property bool open: false property bool open: false
property int selIdx: 0 property int selIdx: 0
// Both axes animate so the panel expands from a small
// point on the column (like the top dropdowns' stub seed)
// instead of rolling out at full height.
property real openW: open ? 64 : 0 property real openW: open ? 64 : 0
property real openH: open ? sessionCard.height + 24 : 36
Behavior on openW { Behavior on openW {
NumberAnimation { duration: 280; easing.type: Easing.OutExpo } NumberAnimation { duration: 280; easing.type: Easing.OutExpo }
} }
Behavior on openH {
NumberAnimation { duration: 280; easing.type: Easing.OutExpo }
}
readonly property var actions: [ readonly property var actions: [
{ icon: "lock", danger: false, act: "lock" }, { icon: "lock", danger: false, act: "lock" },
@ -420,7 +427,7 @@ in
x: bar.width - Theme.frameWidth - openW x: bar.width - Theme.frameWidth - openW
y: Math.round((bar.height - height) / 2) y: Math.round((bar.height - height) / 2)
width: openW width: openW
height: sessionCard.height + 24 height: openH
visible: openW > 0.5 visible: openW > 0.5
focus: open focus: open
@ -534,14 +541,20 @@ in
readonly property real panelW: 420 readonly property real panelW: 420
property real targetH: 36 + launcherList.contentHeight property real targetH: 36 + launcherList.contentHeight
+ (launcherList.count > 0 ? 8 : 0) + 24 + (launcherList.count > 0 ? 8 : 0) + 24
// Both axes animate: expands from a small point on the
// bottom edge (like the top dropdowns' stub seed).
property real openH: open ? targetH : 0 property real openH: open ? targetH : 0
property real openW: open ? panelW : 80
Behavior on openH { Behavior on openH {
NumberAnimation { duration: 280; easing.type: Easing.OutExpo } NumberAnimation { duration: 280; easing.type: Easing.OutExpo }
} }
Behavior on openW {
NumberAnimation { duration: 280; easing.type: Easing.OutExpo }
}
x: Math.round((bar.width - panelW) / 2) x: Math.round((bar.width - openW) / 2)
y: bar.height - Theme.frameWidth - openH y: bar.height - Theme.frameWidth - openH
width: panelW width: openW
height: openH height: openH
visible: openH > 0.5 visible: openH > 0.5