qml: pressing "Esc" on desktop to ~simulate "back" button
This commit is contained in:
@@ -23,7 +23,7 @@ ElDialog {
|
|||||||
|
|
||||||
focus: true
|
focus: true
|
||||||
|
|
||||||
closePolicy: canCancel ? Popup.CloseOnEscape | Popup.CloseOnPressOutside : Popup.NoAutoClose
|
closePolicy: canCancel ? Popup.CloseOnPressOutside : Popup.NoAutoClose
|
||||||
|
|
||||||
property bool canCancel: true
|
property bool canCancel: true
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ Dialog {
|
|||||||
}
|
}
|
||||||
|
|
||||||
closePolicy: allowClose
|
closePolicy: allowClose
|
||||||
? Popup.CloseOnEscape | Popup.CloseOnPressOutside
|
? Popup.CloseOnPressOutside
|
||||||
: Popup.NoAutoClose
|
: Popup.NoAutoClose
|
||||||
|
|
||||||
onOpenedChanged: {
|
onOpenedChanged: {
|
||||||
|
|||||||
@@ -430,6 +430,14 @@ ApplicationWindow
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Shortcut {
|
||||||
|
context: Qt.ApplicationShortcut
|
||||||
|
sequence: "Esc"
|
||||||
|
onActivated: {
|
||||||
|
close()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
target: Daemon
|
target: Daemon
|
||||||
function onWalletRequiresPassword(name, path) {
|
function onWalletRequiresPassword(name, path) {
|
||||||
|
|||||||
Reference in New Issue
Block a user