diff options
| author | mmbyday <bromark@protonmail.com> | 2018-12-04 13:56:21 -0500 |
|---|---|---|
| committer | mmbyday <bromark@protonmail.com> | 2018-12-04 14:16:03 -0500 |
| commit | 56bd6065e5aaa5f72b1a95fcc345bac666f38bcb (patch) | |
| tree | d4ec008ca1f2f2bdd899fa622d20f227b1a1e632 | |
| parent | 9f6b4334a19f3172a28b718da31222ded1f28254 (diff) | |
| download | monzero-gui-56bd6065e5aaa5f72b1a95fcc345bac666f38bcb.tar.gz monzero-gui-56bd6065e5aaa5f72b1a95fcc345bac666f38bcb.tar.xz monzero-gui-56bd6065e5aaa5f72b1a95fcc345bac666f38bcb.zip | |
addressbook: improve readability by truncating long text and allowing wrapmode on address/description/paymentid fields
| -rw-r--r-- | components/AddressBookTable.qml | 17 | ||||
| -rw-r--r-- | pages/AddressBook.qml | 10 |
2 files changed, 22 insertions, 5 deletions
diff --git a/components/AddressBookTable.qml b/components/AddressBookTable.qml index cae68d2f..00a29b9d 100644 --- a/components/AddressBookTable.qml +++ b/components/AddressBookTable.qml @@ -28,6 +28,7 @@ import QtQuick 2.0 import moneroComponents.Clipboard 1.0 +import "../js/TxUtils.js" as TxUtils ListView { id: listView @@ -88,7 +89,13 @@ ListView { font.family: "Arial" font.pixelSize: 16 color: "#ffffff" - text: address + text: { + if(isMobile){ + TxUtils.addressTruncate(address, 6); + } else { + return TxUtils.addressTruncate(address, 10); + } + } readOnly: true } @@ -117,7 +124,13 @@ ListView { font.family: "Arial" font.pixelSize: 13 color: "#545454" - text: paymentId + text: { + if(isMobile){ + TxUtils.addressTruncate(paymentId, 6); + } else { + return TxUtils.addressTruncate(paymentId, 10); + } + } } ListModel { diff --git a/pages/AddressBook.qml b/pages/AddressBook.qml index 21e261e0..2b0e615e 100644 --- a/pages/AddressBook.qml +++ b/pages/AddressBook.qml @@ -58,29 +58,33 @@ Rectangle { } } - LineEdit { + LineEditMulti { Layout.fillWidth: true; id: addressLine labelText: qsTr("Address") + translationManager.emptyString error: true; placeholderText: qsTr("4.. / 8..") + translationManager.emptyString + wrapMode: Text.WrapAnywhere + addressValidation: true } } - LineEdit { + LineEditMulti { id: paymentIdLine Layout.fillWidth: true; labelText: qsTr("Payment ID <font size='2'>(Optional)</font>") + translationManager.emptyString placeholderText: qsTr("Paste 64 hexadecimal characters") + translationManager.emptyString + wrapMode: Text.WrapAnywhere // tipText: qsTr("<b>Payment ID</b><br/><br/>A unique user name used in<br/>the address book. It is not a<br/>transfer of information sent<br/>during the transfer") // + translationManager.emptyString } - LineEdit { + LineEditMulti { id: descriptionLine Layout.fillWidth: true; labelText: qsTr("Description <font size='2'>(Optional)</font>") + translationManager.emptyString placeholderText: qsTr("Give this entry a name or description") + translationManager.emptyString + wrapMode: Text.WrapAnywhere } |
