From 12a3d687c61518c7becfeb5a98ad963a75d9313f Mon Sep 17 00:00:00 2001 From: xiphon Date: Sat, 27 Oct 2018 12:27:18 +0000 Subject: [PATCH 1/2] receive: fix Amount and QR-Code layout --- pages/Receive.qml | 60 +++++++++++++++++++++++------------------------ 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/pages/Receive.qml b/pages/Receive.qml index dbfa325c..1b8c436f 100644 --- a/pages/Receive.qml +++ b/pages/Receive.qml @@ -443,7 +443,7 @@ Rectangle { Layout.fillWidth: true Layout.minimumWidth: 200 - Layout.maximumWidth: mainLayout.qrCodeSize + spacing: parent.spacing LineEdit { id: amountToReceiveLine @@ -456,43 +456,43 @@ Rectangle { regExp: /(\d{1,8})([.]\d{1,12})?$/ } } - } - Rectangle { - color: "white" - Layout.topMargin: parent.spacing - 4 - Layout.fillWidth: true - Layout.maximumWidth: mainLayout.qrCodeSize - Layout.preferredHeight: width - radius: 4 + Rectangle { + color: "white" - Image { - id: qrCode - anchors.fill: parent - anchors.margins: 1 + Layout.fillWidth: true + Layout.maximumWidth: mainLayout.qrCodeSize + Layout.preferredHeight: width + radius: 4 - smooth: false - fillMode: Image.PreserveAspectFit - source: "image://qrcode/" + makeQRCodeString() - MouseArea { + Image { + id: qrCode anchors.fill: parent - acceptedButtons: Qt.RightButton - onClicked: { - if (mouse.button == Qt.RightButton) - qrMenu.open() + anchors.margins: 1 + + smooth: false + fillMode: Image.PreserveAspectFit + source: "image://qrcode/" + makeQRCodeString() + MouseArea { + anchors.fill: parent + acceptedButtons: Qt.RightButton + onClicked: { + if (mouse.button == Qt.RightButton) + qrMenu.open() + } + onPressAndHold: qrFileDialog.open() } - onPressAndHold: qrFileDialog.open() } - } - Menu { - id: qrMenu - title: "QrCode" - y: parent.height / 2 + Menu { + id: qrMenu + title: "QrCode" + y: parent.height / 2 - MenuItem { - text: qsTr("Save As") + translationManager.emptyString; - onTriggered: qrFileDialog.open() + MenuItem { + text: qsTr("Save As") + translationManager.emptyString; + onTriggered: qrFileDialog.open() + } } } } From 3b36dc997cceda992fbd8c63a3839e8727a48295 Mon Sep 17 00:00:00 2001 From: xiphon Date: Sat, 27 Oct 2018 12:42:25 +0000 Subject: [PATCH 2/2] receive: add Payment URL --- pages/Receive.qml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pages/Receive.qml b/pages/Receive.qml index 1b8c436f..ea443502 100644 --- a/pages/Receive.qml +++ b/pages/Receive.qml @@ -495,6 +495,16 @@ Rectangle { } } } + + LineEdit { + id: paymentUrl + Layout.fillWidth: true + labelText: qsTr("Payment URL") + translationManager.emptyString + text: makeQRCodeString() + onTextUpdated: function() { paymentUrl.cursorPosition = 0; } + readOnly: true + copyButton: true + } } }