diff options
| author | luigi1111 <luigi1111w@gmail.com> | 2020-04-17 22:09:18 -0500 |
|---|---|---|
| committer | luigi1111 <luigi1111w@gmail.com> | 2020-04-17 22:09:18 -0500 |
| commit | 5fa64c34ec7541cdc82bf0e568d720c46d4c2686 (patch) | |
| tree | 990528d1e9476034e67238dae2e3464dbb478ad5 | |
| parent | 376421667a6432ca3d6a5dc606fa56f74c1a1051 (diff) | |
| parent | de6a9b6779f7d9ff2bb1eac93eea91adf271dd30 (diff) | |
| download | monzero-gui-5fa64c34ec7541cdc82bf0e568d720c46d4c2686.tar.gz monzero-gui-5fa64c34ec7541cdc82bf0e568d720c46d4c2686.tar.xz monzero-gui-5fa64c34ec7541cdc82bf0e568d720c46d4c2686.zip | |
Merge pull request #2831
de6a9b6 Transfer: address book inline button, 2nd inline button, scan QR code button fixes (rating89us)
| -rw-r--r-- | components/InlineButton.qml | 1 | ||||
| -rw-r--r-- | components/LineEditMulti.qml | 9 | ||||
| -rw-r--r-- | pages/Transfer.qml | 30 |
3 files changed, 28 insertions, 12 deletions
diff --git a/components/InlineButton.qml b/components/InlineButton.qml index 402dade2..299f1ae6 100644 --- a/components/InlineButton.qml +++ b/components/InlineButton.qml @@ -53,6 +53,7 @@ Item { property alias fontPixelSize: inlineText.font.pixelSize property alias fontFamily: inlineText.font.family property alias buttonColor: rect.color + property alias buttonHeight: rect.height signal clicked() function doClick() { diff --git a/components/LineEditMulti.qml b/components/LineEditMulti.qml index 46052495..179d0438 100644 --- a/components/LineEditMulti.qml +++ b/components/LineEditMulti.qml @@ -87,6 +87,8 @@ ColumnLayout { property alias inlineButton: inlineButtonId property bool inlineButtonVisible: false + property alias inlineButton2: inlineButton2Id + property bool inlineButton2Visible: false signal labelButtonClicked(); signal inputLabelLinkActivated(); @@ -202,5 +204,12 @@ ColumnLayout { anchors.right: parent.right anchors.rightMargin: 8 } + + MoneroComponents.InlineButton { + id: inlineButton2Id + visible: (inlineButton2Id.text || inlineButton2Id.icon) && inlineButton2Visible ? true : false + anchors.right: parent.right + anchors.rightMargin: inlineButtonVisible ? 48 : 8 + } } } diff --git a/pages/Transfer.qml b/pages/Transfer.qml index 15442ba4..4e490137 100644 --- a/pages/Transfer.qml +++ b/pages/Transfer.qml @@ -307,10 +307,9 @@ Rectangle { LineEditMulti { id: addressLine spacing: 0 + inputPaddingRight: inlineButtonVisible && inlineButton2Visible ? 100 : 60 fontBold: true - labelText: qsTr("<style type='text/css'>a {text-decoration: none; color: #858585; font-size: 14px;}</style>\ - %1 <a href='#'>(%2)</a>").arg(qsTr("Address")).arg(qsTr("Address book")) - + translationManager.emptyString + labelText: qsTr("Address") + translationManager.emptyString labelButtonText: qsTr("Resolve") + translationManager.emptyString placeholderText: { if(persistentSettings.nettype == NetworkType.MAINNET){ @@ -323,10 +322,6 @@ Rectangle { } wrapMode: Text.WrapAnywhere addressValidation: true - onInputLabelLinkActivated: { - middlePanel.addressBookView.selectAndSend = true; - appWindow.showPageRequest("AddressBook"); - } onTextChanged: { const parsed = walletManager.parse_uri_to_object(text); if (!parsed.error) { @@ -336,16 +331,27 @@ Rectangle { setDescription(parsed.tx_description); } } - inlineButton.text: FontAwesome.qrcode + inlineButton.text: FontAwesome.addressBook + inlineButton.buttonHeight: 30 inlineButton.fontPixelSize: 22 inlineButton.fontFamily: FontAwesome.fontFamily inlineButton.textColor: MoneroComponents.Style.defaultFontColor - inlineButton.buttonColor: MoneroComponents.Style.orange inlineButton.onClicked: { - cameraUi.state = "Capture" - cameraUi.qrcode_decoded.connect(updateFromQrCode) + middlePanel.addressBookView.selectAndSend = true; + appWindow.showPageRequest("AddressBook"); + } + inlineButtonVisible: true + + inlineButton2.text: FontAwesome.qrcode + inlineButton2.buttonHeight: 30 + inlineButton2.fontPixelSize: 22 + inlineButton2.fontFamily: FontAwesome.fontFamily + inlineButton2.textColor: MoneroComponents.Style.defaultFontColor + inlineButton2.onClicked: { + cameraUi.state = "Capture" + cameraUi.qrcode_decoded.connect(updateFromQrCode) } - inlineButtonVisible : appWindow.qrScannerEnabled && !addressLine.text + inlineButton2Visible: appWindow.qrScannerEnabled } } |
