add focus navigation to qml
This commit is contained in:
parent
cecee3769e
commit
01e31b4b4d
23 changed files with 103 additions and 196 deletions
|
|
@ -13,8 +13,6 @@ import "../Controls2/TextTypes"
|
|||
PageType {
|
||||
id: root
|
||||
|
||||
// defaultActiveFocusItem: hostname.textField
|
||||
|
||||
BackButtonType {
|
||||
id: backButton
|
||||
|
||||
|
|
@ -54,6 +52,8 @@ PageType {
|
|||
headerText: qsTr("Server IP address [:port]")
|
||||
textFieldPlaceholderText: qsTr("255.255.255.255:22")
|
||||
|
||||
parentFlickable: fl
|
||||
|
||||
textField.onFocusChanged: {
|
||||
textField.text = textField.text.replace(/^\s+|\s+$/g, '')
|
||||
}
|
||||
|
|
@ -66,6 +66,8 @@ PageType {
|
|||
headerText: qsTr("SSH Username")
|
||||
textFieldPlaceholderText: "root"
|
||||
|
||||
parentFlickable: fl
|
||||
|
||||
textField.onFocusChanged: {
|
||||
textField.text = textField.text.replace(/^\s+|\s+$/g, '')
|
||||
}
|
||||
|
|
@ -82,6 +84,8 @@ PageType {
|
|||
buttonImageSource: textFieldText !== "" ? (hidePassword ? "qrc:/images/controls/eye.svg" : "qrc:/images/controls/eye-off.svg")
|
||||
: ""
|
||||
|
||||
parentFlickable: fl
|
||||
|
||||
clickedFunc: function() {
|
||||
hidePassword = !hidePassword
|
||||
}
|
||||
|
|
@ -99,6 +103,8 @@ PageType {
|
|||
|
||||
text: qsTr("Continue")
|
||||
|
||||
parentFlickable: fl
|
||||
|
||||
clickedFunc: function() {
|
||||
forceActiveFocus()
|
||||
if (!isCredentialsFilled()) {
|
||||
|
|
@ -138,6 +144,8 @@ PageType {
|
|||
rightImageSource: "qrc:/images/controls/chevron-right.svg"
|
||||
leftImageSource: "qrc:/images/controls/help-circle.svg"
|
||||
|
||||
parentFlickable: fl
|
||||
|
||||
onClicked: {
|
||||
Qt.openUrlExternally(LanguageModel.getCurrentSiteUrl() + "/starter-guide")
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue