Dismiss action drawer with Escape in convergence mode

This commit is contained in:
Marco Allegretti 2026-04-13 13:53:53 +02:00
parent 3cf1f4708e
commit 2c77b4c979
2 changed files with 8 additions and 1 deletions

View file

@ -169,8 +169,15 @@ Item {
root.state = ""; root.state = "";
} }
Keys.onEscapePressed: {
if (intendedToBeVisible) {
close();
}
}
function open() { function open() {
cancelAnimations(); cancelAnimations();
forceActiveFocus();
if (openToPinnedMode) { if (openToPinnedMode) {
root.state = "open"; // go to pinned height root.state = "open"; // go to pinned height
} else { } else {

View file

@ -27,7 +27,7 @@ Window {
LayerShell.Window.anchors: LayerShell.Window.AnchorTop | LayerShell.Window.AnchorLeft | LayerShell.Window.AnchorRight | LayerShell.Window.AnchorBottom LayerShell.Window.anchors: LayerShell.Window.AnchorTop | LayerShell.Window.AnchorLeft | LayerShell.Window.AnchorRight | LayerShell.Window.AnchorBottom
LayerShell.Window.layer: LayerShell.Window.LayerOverlay LayerShell.Window.layer: LayerShell.Window.LayerOverlay
LayerShell.Window.exclusionZone: -1 LayerShell.Window.exclusionZone: -1
LayerShell.Window.keyboardInteractivity: LayerShell.Window.KeyboardInteractivityNone LayerShell.Window.keyboardInteractivity: drawer.intendedToBeVisible ? LayerShell.Window.KeyboardInteractivityExclusive : LayerShell.Window.KeyboardInteractivityNone
/** /**
* The ActionDrawer component. * The ActionDrawer component.