mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-06-22 02:01:08 +07:00
add navigation using enter + buttons will be clicked if enter (if but… (#556)
Enter navigation
This commit is contained in:
@@ -106,14 +106,18 @@ PageType {
|
||||
textFieldText: name
|
||||
textField.maximumLength: 30
|
||||
checkEmptyText: true
|
||||
|
||||
KeyNavigation.tab: saveButton
|
||||
}
|
||||
|
||||
BasicButtonType {
|
||||
id: saveButton
|
||||
|
||||
Layout.fillWidth: true
|
||||
|
||||
text: qsTr("Save")
|
||||
|
||||
onClicked: {
|
||||
clickedFunc: function() {
|
||||
if (serverName.textFieldText === "") {
|
||||
return
|
||||
}
|
||||
@@ -124,6 +128,12 @@ PageType {
|
||||
serverNameEditDrawer.close()
|
||||
}
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
if (header.itemAt(0)) {
|
||||
defaultActiveFocusItem = serverName.textField
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user