quickshell: remove grabFocus, animate close on clock click
Wayland popup protocol prevents re-showing dismissed popups. Remove grabFocus and toggle open/close via clock click only, allowing the slide-up animation to play on close. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
25856f114f
commit
96566d0319
1 changed files with 4 additions and 13 deletions
|
|
@ -518,11 +518,10 @@ in
|
|||
MouseArea {
|
||||
anchors.fill: parent
|
||||
onClicked: {
|
||||
if (calPopup.visible && !calPopup.closing) {
|
||||
calPopup.closing = true;
|
||||
if (calPopup.visible) {
|
||||
calPopup.open = false;
|
||||
calCloseTimer.start();
|
||||
} else if (!calPopup.visible) {
|
||||
} else {
|
||||
calPopup.visible = true;
|
||||
}
|
||||
}
|
||||
|
|
@ -531,7 +530,7 @@ in
|
|||
Timer {
|
||||
id: calCloseTimer
|
||||
interval: 230
|
||||
onTriggered: { calPopup.closing = false; calPopup.visible = false; }
|
||||
onTriggered: calPopup.visible = false
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -837,12 +836,10 @@ in
|
|||
anchor.edges: Edges.Top | Edges.Left
|
||||
anchor.gravity: Edges.Bottom | Edges.Right
|
||||
anchor.adjustment: PopupAdjustment.Slide
|
||||
grabFocus: true
|
||||
visible: false
|
||||
color: "transparent"
|
||||
|
||||
property bool open: false
|
||||
property bool closing: false
|
||||
property real fullWidth: calCol.width + 32
|
||||
property real fullHeight: calCol.height + 24
|
||||
|
||||
|
|
@ -851,13 +848,7 @@ in
|
|||
|
||||
onVisibleChanged: {
|
||||
if (visible) {
|
||||
if (!closing) open = true;
|
||||
} else if (open && !closing) {
|
||||
// grabFocus hid us — re-show and animate closed
|
||||
closing = true;
|
||||
visible = true;
|
||||
open = false;
|
||||
calCloseTimer.start();
|
||||
open = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue