mirror of
https://github.com/monero-project/monero-gui.git
synced 2025-02-24 02:30:33 +02:00
Merge pull request #1706
12a3d68
receive: fix Amount and QR-Code layout (xiphon)3b36dc9
receive: add Payment URL (xiphon)
This commit is contained in:
commit
0b73229f6c
@ -443,7 +443,7 @@ Rectangle {
|
|||||||
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.minimumWidth: 200
|
Layout.minimumWidth: 200
|
||||||
Layout.maximumWidth: mainLayout.qrCodeSize
|
spacing: parent.spacing
|
||||||
|
|
||||||
LineEdit {
|
LineEdit {
|
||||||
id: amountToReceiveLine
|
id: amountToReceiveLine
|
||||||
@ -456,44 +456,54 @@ Rectangle {
|
|||||||
regExp: /(\d{1,8})([.]\d{1,12})?$/
|
regExp: /(\d{1,8})([.]\d{1,12})?$/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
color: "white"
|
color: "white"
|
||||||
Layout.topMargin: parent.spacing - 4
|
|
||||||
Layout.fillWidth: true
|
|
||||||
Layout.maximumWidth: mainLayout.qrCodeSize
|
|
||||||
Layout.preferredHeight: width
|
|
||||||
radius: 4
|
|
||||||
|
|
||||||
Image {
|
Layout.fillWidth: true
|
||||||
id: qrCode
|
Layout.maximumWidth: mainLayout.qrCodeSize
|
||||||
anchors.fill: parent
|
Layout.preferredHeight: width
|
||||||
anchors.margins: 1
|
radius: 4
|
||||||
|
|
||||||
smooth: false
|
Image {
|
||||||
fillMode: Image.PreserveAspectFit
|
id: qrCode
|
||||||
source: "image://qrcode/" + makeQRCodeString()
|
|
||||||
MouseArea {
|
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
acceptedButtons: Qt.RightButton
|
anchors.margins: 1
|
||||||
onClicked: {
|
|
||||||
if (mouse.button == Qt.RightButton)
|
smooth: false
|
||||||
qrMenu.open()
|
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()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Menu {
|
||||||
|
id: qrMenu
|
||||||
|
title: "QrCode"
|
||||||
|
y: parent.height / 2
|
||||||
|
|
||||||
|
MenuItem {
|
||||||
|
text: qsTr("Save As") + translationManager.emptyString;
|
||||||
|
onTriggered: qrFileDialog.open()
|
||||||
}
|
}
|
||||||
onPressAndHold: qrFileDialog.open()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Menu {
|
LineEdit {
|
||||||
id: qrMenu
|
id: paymentUrl
|
||||||
title: "QrCode"
|
Layout.fillWidth: true
|
||||||
y: parent.height / 2
|
labelText: qsTr("Payment URL") + translationManager.emptyString
|
||||||
|
text: makeQRCodeString()
|
||||||
MenuItem {
|
onTextUpdated: function() { paymentUrl.cursorPosition = 0; }
|
||||||
text: qsTr("Save As") + translationManager.emptyString;
|
readOnly: true
|
||||||
onTriggered: qrFileDialog.open()
|
copyButton: true
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user