Unify cancel button & escape keybind for pages
AddChat and AccountSettings: - When clicking the cancel button, if there's no previous back to go back to, focus the main pane instead of doing nothing AccountSettings: - Always enable the cancel button, not just when the form has been modified AddChat, AccountSettings, ServerBrowser: - Pressing escape will do the same thing as clicking the cancel button
This commit is contained in:
@@ -58,7 +58,7 @@ HFlickableColumnPage {
|
||||
userField.item.reset()
|
||||
errorMessage.text = ""
|
||||
|
||||
pageLoader.showPrevious()
|
||||
pageLoader.showPrevious() || mainUI.mainPane.toggleFocus()
|
||||
}
|
||||
|
||||
enabled: account && account.presence !== "offline"
|
||||
@@ -73,12 +73,8 @@ HFlickableColumnPage {
|
||||
}
|
||||
|
||||
CancelButton {
|
||||
onClicked: {
|
||||
userField.item.reset()
|
||||
errorMessage.text = ""
|
||||
|
||||
pageLoader.showPrevious()
|
||||
}
|
||||
enabled: main
|
||||
onClicked: page.cancel()
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user