diff options
| author | xiphon <xiphon@protonmail.com> | 2020-12-24 08:05:14 +0000 |
|---|---|---|
| committer | xiphon <xiphon@protonmail.com> | 2020-12-24 08:20:38 +0000 |
| commit | ba4d6993b78a3a0e7c0d0b0f09ab071b1bb5e447 (patch) | |
| tree | 0d8c1abb14863f854c5aed5991ae391f2efc53bc /pages | |
| parent | fed00a5662dcbc77c928a06778d7c9001e7d90f9 (diff) | |
| download | monzero-gui-ba4d6993b78a3a0e7c0d0b0f09ab071b1bb5e447.tar.gz monzero-gui-ba4d6993b78a3a0e7c0d0b0f09ab071b1bb5e447.tar.xz monzero-gui-ba4d6993b78a3a0e7c0d0b0f09ab071b1bb5e447.zip | |
LineEdit: fix padding, fix inline buttons layout, multiple btns support
Diffstat (limited to 'pages')
| -rw-r--r-- | pages/AddressBook.qml | 18 | ||||
| -rw-r--r-- | pages/Transfer.qml | 49 |
2 files changed, 33 insertions, 34 deletions
diff --git a/pages/AddressBook.qml b/pages/AddressBook.qml index db2e7c05..e0a26c70 100644 --- a/pages/AddressBook.qml +++ b/pages/AddressBook.qml @@ -314,16 +314,16 @@ Rectangle { } } - inlineButton.text: FontAwesome.qrcode - 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(root.updateFromQrCode) + MoneroComponents.InlineButton { + buttonColor: MoneroComponents.Style.orange + fontFamily: FontAwesome.fontFamily + text: FontAwesome.qrcode + visible : appWindow.qrScannerEnabled && !addressLine.text + onClicked: { + cameraUi.state = "Capture" + cameraUi.qrcode_decoded.connect(root.updateFromQrCode) + } } - inlineButtonVisible : appWindow.qrScannerEnabled && !addressLine.text } MoneroComponents.StandardButton { diff --git a/pages/Transfer.qml b/pages/Transfer.qml index 44edd403..dc4687dd 100644 --- a/pages/Transfer.qml +++ b/pages/Transfer.qml @@ -172,7 +172,6 @@ Rectangle { id: addressLine KeyNavigation.tab: amountLine spacing: 0 - inputPaddingRight: inlineButtonVisible && inlineButton2Visible ? 100 : 60 fontBold: true labelText: qsTr("Address") + translationManager.emptyString labelButtonText: qsTr("Resolve") + translationManager.emptyString @@ -196,27 +195,25 @@ Rectangle { setDescription(parsed.tx_description); } } - inlineButton.text: FontAwesome.addressBook - inlineButton.buttonHeight: 30 - inlineButton.fontPixelSize: 22 - inlineButton.fontFamily: FontAwesome.fontFamily - inlineButton.textColor: MoneroComponents.Style.defaultFontColor - inlineButton.onClicked: { - 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) - } - inlineButton2Visible: appWindow.qrScannerEnabled + + MoneroComponents.InlineButton { + fontFamily: FontAwesome.fontFamily + text: FontAwesome.addressBook + onClicked: { + middlePanel.addressBookView.selectAndSend = true; + appWindow.showPageRequest("AddressBook"); + } + } + + MoneroComponents.InlineButton { + fontFamily: FontAwesome.fontFamily + text: FontAwesome.qrcode + visible: appWindow.qrScannerEnabled + onClicked: { + cameraUi.state = "Capture" + cameraUi.qrcode_decoded.connect(updateFromQrCode) + } + } } } @@ -295,8 +292,6 @@ Rectangle { placeholderText: "0.00" width: 100 fontBold: true - inlineButtonText: qsTr("All") + translationManager.emptyString - inlineButton.onClicked: amountLine.text = "(all)" onTextChanged: { amountLine.text = amountLine.text.replace(",", "."); const match = amountLine.text.match(/^0+(\d.*)/); @@ -312,10 +307,14 @@ Rectangle { } amountLine.error = walletManager.amountFromString(amountLine.text) > appWindow.getUnlockedBalance() } - validator: RegExpValidator { regExp: /^(\d{1,8})?([\.,]\d{1,12})?$/ } + + MoneroComponents.InlineButton { + text: qsTr("All") + translationManager.emptyString + onClicked: amountLine.text = "(all)" + } } MoneroComponents.TextPlain { |
