diff options
| author | Alexander Blair <snipa@jagtech.io> | 2020-12-03 12:24:22 -0800 |
|---|---|---|
| committer | Alexander Blair <snipa@jagtech.io> | 2020-12-03 12:24:22 -0800 |
| commit | 6fe41e6f5517d4cc2c2040f40a459d6a78726bc0 (patch) | |
| tree | 19a04b9cff2aed7245f50f6d3809fcbc3346d861 | |
| parent | 2a6ad67f7791e1799cd1bb8e08d009be39077e18 (diff) | |
| parent | 0d5d2dbf5ea5cc575b1e38854e935a8f1794146b (diff) | |
| download | monzero-gui-6fe41e6f5517d4cc2c2040f40a459d6a78726bc0.tar.gz monzero-gui-6fe41e6f5517d4cc2c2040f40a459d6a78726bc0.tar.xz monzero-gui-6fe41e6f5517d4cc2c2040f40a459d6a78726bc0.zip | |
Merge pull request #3254
0d5d2dbf Transfer: fix focus, cycle focus between Address, Amount and Send (xiphon)
| -rw-r--r-- | components/LineEdit.qml | 2 | ||||
| -rw-r--r-- | components/LineEditMulti.qml | 6 | ||||
| -rw-r--r-- | components/StandardButton.qml | 4 | ||||
| -rw-r--r-- | pages/Transfer.qml | 3 |
4 files changed, 12 insertions, 3 deletions
diff --git a/components/LineEdit.qml b/components/LineEdit.qml index 118067f4..aad42895 100644 --- a/components/LineEdit.qml +++ b/components/LineEdit.qml @@ -94,6 +94,7 @@ Item { height: showingHeader ? (inputLabel.height + inputItem.height + 2) : 42 + onActiveFocusChanged: activeFocus && input.forceActiveFocus() onTextUpdated: { // check to remove placeholder text when there is content if(item.isEmpty()){ @@ -234,6 +235,7 @@ Item { anchors.leftMargin: inlineIcon.visible ? 44 : 0 font.pixelSize: item.fontSize font.bold: item.fontBold + KeyNavigation.tab: item.KeyNavigation.tab onEditingFinished: item.editingFinished() onAccepted: item.accepted(); onTextChanged: item.textUpdated() diff --git a/components/LineEditMulti.qml b/components/LineEditMulti.qml index 179d0438..4e971285 100644 --- a/components/LineEditMulti.qml +++ b/components/LineEditMulti.qml @@ -94,6 +94,8 @@ ColumnLayout { signal inputLabelLinkActivated(); signal editingFinished(); + onActiveFocusChanged: activeFocus && input.forceActiveFocus() + spacing: 0 Rectangle { id: inputLabelRect @@ -159,8 +161,10 @@ ColumnLayout { id: input readOnly: false addressValidation: false + KeyNavigation.priority: KeyNavigation.BeforeItem + KeyNavigation.tab: item.KeyNavigation.tab Layout.fillWidth: true - + leftPadding: item.inputPaddingLeft rightPadding: item.inputPaddingRight topPadding: item.inputPaddingTop diff --git a/components/StandardButton.qml b/components/StandardButton.qml index c69adb29..d26d9aa8 100644 --- a/components/StandardButton.qml +++ b/components/StandardButton.qml @@ -68,7 +68,7 @@ Item { id: buttonRect anchors.fill: parent radius: 3 - border.width: parent.focus ? 1 : 0 + border.width: parent.focus && parent.enabled ? 1 : 0 state: button.enabled ? "active" : "disabled" Component.onCompleted: state = state @@ -76,7 +76,7 @@ Item { states: [ State { name: "hover" - when: buttonArea.containsMouse || button.focus + when: button.enabled && (buttonArea.containsMouse || button.focus) PropertyChanges { target: buttonRect color: primary diff --git a/pages/Transfer.qml b/pages/Transfer.qml index dce9179b..44edd403 100644 --- a/pages/Transfer.qml +++ b/pages/Transfer.qml @@ -170,6 +170,7 @@ Rectangle { LineEditMulti { id: addressLine + KeyNavigation.tab: amountLine spacing: 0 inputPaddingRight: inlineButtonVisible && inlineButton2Visible ? 100 : 60 fontBold: true @@ -277,6 +278,7 @@ Rectangle { // Amount input LineEdit { id: amountLine + KeyNavigation.tab: sendButton Layout.fillWidth: true inlineIcon: true labelText: "<style type='text/css'>a {text-decoration: none; color: #858585; font-size: 14px;}</style>\ @@ -488,6 +490,7 @@ Rectangle { RowLayout { StandardButton { id: sendButton + KeyNavigation.tab: addressLine rightIcon: "qrc:///images/rightArrow.png" rightIconInactive: "qrc:///images/rightArrowInactive.png" Layout.topMargin: 4 |
