diff --git a/images/download-white.png b/images/download-white.png new file mode 100644 index 00000000..a8621352 Binary files /dev/null and b/images/download-white.png differ diff --git a/images/download-white@2x.png b/images/download-white@2x.png new file mode 100644 index 00000000..c91be23b Binary files /dev/null and b/images/download-white@2x.png differ diff --git a/images/external-link-white.png b/images/external-link-white.png new file mode 100644 index 00000000..e771b8d1 Binary files /dev/null and b/images/external-link-white.png differ diff --git a/images/external-link-white@2x.png b/images/external-link-white@2x.png new file mode 100644 index 00000000..b0a72f96 Binary files /dev/null and b/images/external-link-white@2x.png differ diff --git a/pages/Receive.qml b/pages/Receive.qml index 2c840ab4..ee0a2554 100644 --- a/pages/Receive.qml +++ b/pages/Receive.qml @@ -270,83 +270,49 @@ Rectangle { } } - RowLayout { - Layout.topMargin: 22 * scaleRatio - MoneroComponents.CheckBox2 { - id: showAdvancedCheckbox - checked: persistentSettings.receiveShowAdvanced - onClicked: { - persistentSettings.receiveShowAdvanced = !persistentSettings.receiveShowAdvanced - } - text: qsTr("Advanced options") + translationManager.emptyString - } - } + ColumnLayout { + Layout.alignment: Qt.AlignHCenter + spacing: 11 * scaleRatio + property int qrSize: 220 * scaleRatio - RowLayout { - Layout.topMargin: 6 * scaleRatio - visible: persistentSettings.receiveShowAdvanced - Layout.fillWidth: true - - MoneroComponents.LineEditMulti { - id: paymentUrl + Rectangle { + id: qrContainer + color: "white" Layout.fillWidth: true + Layout.maximumWidth: parent.qrSize + Layout.preferredHeight: width + radius: 4 * scaleRatio - labelText: qsTr("Payment URL") + translationManager.emptyString - text: TxUtils.makeQRCodeString(appWindow.current_address) - readOnly: true - copyButton: true - wrapMode: Text.WrapAnywhere + Image { + id: qrCode + anchors.fill: parent + anchors.margins: 1 * scaleRatio + + smooth: false + fillMode: Image.PreserveAspectFit + source: "image://qrcode/" + TxUtils.makeQRCodeString(appWindow.current_address) + + MouseArea { + anchors.fill: parent + acceptedButtons: Qt.RightButton + onPressAndHold: qrFileDialog.open() + } + } } - } - - GridLayout{ - visible: persistentSettings.receiveShowAdvanced - Layout.topMargin: 10 * scaleRatio - columns: 2 - columnSpacing: 30 * scaleRatio RowLayout { - property int qrSize: 220 * scaleRatio - Layout.fillWidth: true + spacing: parent.spacing - Rectangle { - id: qrContainer - radius: 4 * scaleRatio - color: "white" - Layout.preferredWidth: parent.qrSize - Layout.preferredHeight: parent.qrSize + MoneroComponents.StandardButton { + rightIcon: "../images/download-white.png" + onClicked: qrFileDialog.open() + } - Image { - id: qrCode - anchors.fill: parent - anchors.margins: 1 * scaleRatio - - smooth: false - fillMode: Image.PreserveAspectFit - source: "image://qrcode/" + TxUtils.makeQRCodeString(appWindow.current_address) - - MouseArea { - anchors.fill: parent - acceptedButtons: Qt.RightButton - onClicked: { - if (mouse.button == Qt.RightButton){ - qrMenu.x = this.mouseX; - qrMenu.y = this.mouseY; - qrMenu.open() - } - } - onPressAndHold: qrFileDialog.open() - } - } - - Menu { - id: qrMenu - title: "QrCode" - - MenuItem { - text: qsTr("Save As") + translationManager.emptyString; - onTriggered: qrFileDialog.open() - } + MoneroComponents.StandardButton { + rightIcon: "../images/external-link-white.png" + onClicked: { + clipboard.setText(TxUtils.makeQRCodeString(appWindow.current_address)); + appWindow.showStatusMessage(qsTr("Copied to clipboard"), 3); } } } diff --git a/qml.qrc b/qml.qrc index f2c1cf4f..d6d37619 100644 --- a/qml.qrc +++ b/qml.qrc @@ -5,6 +5,10 @@ RightPanel.qml MiddlePanel.qml images/closeIcon.png + images/download-white.png + images/download-white@2x.png + images/external-link-white.png + images/external-link-white@2x.png images/helpIcon.png images/maximizeIcon.png images/minimizeIcon.png