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:
parent
be330a0c6d
commit
715ccdd4ae
1 changed files with 16 additions and 3 deletions
|
|
@ -388,10 +388,17 @@ in
|
|||
id: sessionMenu
|
||||
property bool open: false
|
||||
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 openH: open ? sessionCard.height + 24 : 36
|
||||
Behavior on openW {
|
||||
NumberAnimation { duration: 280; easing.type: Easing.OutExpo }
|
||||
}
|
||||
Behavior on openH {
|
||||
NumberAnimation { duration: 280; easing.type: Easing.OutExpo }
|
||||
}
|
||||
|
||||
readonly property var actions: [
|
||||
{ icon: "lock", danger: false, act: "lock" },
|
||||
|
|
@ -420,7 +427,7 @@ in
|
|||
x: bar.width - Theme.frameWidth - openW
|
||||
y: Math.round((bar.height - height) / 2)
|
||||
width: openW
|
||||
height: sessionCard.height + 24
|
||||
height: openH
|
||||
visible: openW > 0.5
|
||||
|
||||
focus: open
|
||||
|
|
@ -534,14 +541,20 @@ in
|
|||
readonly property real panelW: 420
|
||||
property real targetH: 36 + launcherList.contentHeight
|
||||
+ (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 openW: open ? panelW : 80
|
||||
Behavior on openH {
|
||||
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
|
||||
width: panelW
|
||||
width: openW
|
||||
height: openH
|
||||
visible: openH > 0.5
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue