mirror of
https://github.com/Yubico/yubioath-flutter.git
synced 2024-11-29 04:14:52 +03:00
Close dialogs when escape pressed
TextFields needs to do this explicitly
This commit is contained in:
parent
8478bd7539
commit
ffd207b064
@ -28,6 +28,7 @@ DefaultDialog {
|
||||
TextField {
|
||||
id: name
|
||||
Layout.fillWidth: true
|
||||
Keys.onEscapePressed: close()
|
||||
}
|
||||
|
||||
Label {
|
||||
@ -39,6 +40,7 @@ DefaultDialog {
|
||||
validator: RegExpValidator {
|
||||
regExp: /[2-7a-zA-Z]+=*/
|
||||
}
|
||||
Keys.onEscapePressed: close()
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -31,6 +31,7 @@ DefaultDialog {
|
||||
validator: RegExpValidator {
|
||||
regExp: /[2-7a-zA-Z]+=*/
|
||||
}
|
||||
Keys.onEscapePressed: close()
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5,6 +5,9 @@ import QtQuick.Window 2.2
|
||||
|
||||
ApplicationWindow {
|
||||
|
||||
|
||||
|
||||
|
||||
SystemPalette {
|
||||
id: palette
|
||||
}
|
||||
@ -37,8 +40,13 @@ ApplicationWindow {
|
||||
Item {
|
||||
id: destruction_parent
|
||||
}
|
||||
Item {
|
||||
focus: true
|
||||
Keys.onEscapePressed: close()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function open() {
|
||||
show()
|
||||
}
|
||||
|
@ -25,6 +25,7 @@ DefaultDialog {
|
||||
id: newPassword
|
||||
echoMode: TextInput.Password
|
||||
Layout.fillWidth: true
|
||||
Keys.onEscapePressed: close()
|
||||
}
|
||||
Label {
|
||||
text: qsTr("Confirm password: ")
|
||||
@ -34,6 +35,7 @@ DefaultDialog {
|
||||
echoMode: TextInput.Password
|
||||
Layout.fillWidth: true
|
||||
onAccepted: promptAccepted()
|
||||
Keys.onEscapePressed: close()
|
||||
}
|
||||
}
|
||||
RowLayout {
|
||||
|
Loading…
Reference in New Issue
Block a user