summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleix Pol <[email protected]>2017-03-10 17:30:16 +0100
committerAleix Pol <[email protected]>2017-03-10 17:30:16 +0100
commit58c8afba8166a6e91f3180d6443eaabc27603d73 (patch)
tree2c4c3c6a4a83368b2bec312d55a0691a612a7dcf
parentcd2f1d41db27a96e955c01eef505f0d744b48c99 (diff)
Allow to close the current page by pressing escape
There's no visual way of doing that just yet, but it makes sense to be able to do. BUG: 377384
-rw-r--r--discover/qml/DiscoverPage.qml8
1 files changed, 8 insertions, 0 deletions
diff --git a/discover/qml/DiscoverPage.qml b/discover/qml/DiscoverPage.qml
index 7be7de7..00c6331 100644
--- a/discover/qml/DiscoverPage.qml
+++ b/discover/qml/DiscoverPage.qml
@@ -91,4 +91,12 @@ Kirigami.ScrollablePage
root.flickable.returnToBounds()
}
}
+
+ readonly property var sClose: Shortcut {
+ sequence: StandardKey.Cancel
+ enabled: root.isCurrentPage && applicationWindow().pageStack.depth>=1
+ onActivated: {
+ applicationWindow().pageStack.pop()
+ }
+ }
}