Merge pull request #2429

74e12ce ContextMenu: implement 'paste' context menu for all text fields (xiphon)
This commit is contained in:
luigi1111
2019-11-13 09:03:02 -06:00
12 changed files with 78 additions and 19 deletions

View File

@@ -325,8 +325,8 @@ Rectangle {
wrapMode: Text.WrapAnywhere
addressValidation: true
pasteButton: true
onPaste: function(clipboardText) {
const parsed = walletManager.parse_uri_to_object(clipboardText);
onTextChanged: {
const parsed = walletManager.parse_uri_to_object(addressLine.text);
if (!parsed.error) {
addressLine.text = parsed.address;
descriptionLine.text = parsed.tx_description;

View File

@@ -257,18 +257,14 @@ Rectangle {
appWindow.showPageRequest("AddressBook");
}
pasteButton: true
onPaste: function(clipboardText) {
const parsed = walletManager.parse_uri_to_object(clipboardText);
onTextChanged: {
const parsed = walletManager.parse_uri_to_object(text);
if (!parsed.error) {
addressLine.text = parsed.address;
setPaymentId(parsed.payment_id);
amountLine.text = parsed.amount;
setDescription(parsed.tx_description);
} else {
addressLine.text = clipboardText;
}
}
onTextChanged: {
warningLongPidTransfer = isLongPidService(text);
}
inlineButton.text: FontAwesome.qrcode

View File

@@ -455,7 +455,7 @@ Item {
width: 220
source: "qrc:///images/merchant/input_box.png"
TextField {
MoneroComponents.Input {
id: amountToReceive
topPadding: 0
leftPadding: 10