mirror of
https://github.com/monero-project/monero-gui.git
synced 2024-11-17 00:07:51 +00:00
BasicPanel: embedding/reusing "Transfer" page
This commit is contained in:
parent
983317b449
commit
fc7a7ddf25
2 changed files with 29 additions and 68 deletions
|
@ -28,15 +28,32 @@
|
||||||
|
|
||||||
import QtQuick 2.0
|
import QtQuick 2.0
|
||||||
import "components"
|
import "components"
|
||||||
|
import "pages"
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
|
id: root
|
||||||
width: 470
|
width: 470
|
||||||
height: paymentId.y + paymentId.height + 12
|
// height: paymentId.y + paymentId.height + 12
|
||||||
|
height: header.height + header.anchors.topMargin + transferBasic.height
|
||||||
color: "#F0EEEE"
|
color: "#F0EEEE"
|
||||||
|
|
||||||
border.width: 1
|
border.width: 1
|
||||||
border.color: "#DBDBDB"
|
border.color: "#DBDBDB"
|
||||||
|
|
||||||
property alias balanceText : balanceText.text;
|
property alias balanceText : balanceText.text;
|
||||||
property alias unlockedBalanceText : availableBalanceText.text;
|
property alias unlockedBalanceText : availableBalanceText.text;
|
||||||
|
// repeating signal to the outside world
|
||||||
|
signal paymentClicked(string address, string paymentId, double amount, int mixinCount,
|
||||||
|
int priority)
|
||||||
|
|
||||||
|
Connections {
|
||||||
|
target: transferBasic
|
||||||
|
onPaymentClicked: {
|
||||||
|
console.log("BasicPanel: paymentClicked")
|
||||||
|
root.paymentClicked(address, paymentId, amount, mixinCount, priority)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: header
|
id: header
|
||||||
|
@ -139,76 +156,16 @@ Rectangle {
|
||||||
color: "#DBDBDB"
|
color: "#DBDBDB"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Item {
|
||||||
Row {
|
|
||||||
id: row
|
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.right: parent.right
|
|
||||||
anchors.top: header.bottom
|
anchors.top: header.bottom
|
||||||
anchors.margins: 12
|
anchors.bottom: parent.bottom
|
||||||
spacing: 12
|
|
||||||
|
|
||||||
LineEdit {
|
|
||||||
height: 32
|
|
||||||
fontSize: 15
|
|
||||||
width: parent.width - sendButton.width - row.spacing
|
|
||||||
placeholderText: qsTr("amount...") + translationManager.emptyString
|
|
||||||
}
|
|
||||||
|
|
||||||
StandardButton {
|
|
||||||
id: sendButton
|
|
||||||
width: 60
|
|
||||||
height: 32
|
|
||||||
fontSize: 11
|
|
||||||
text: qsTr("SEND")
|
|
||||||
shadowReleasedColor: "#FF4304"
|
|
||||||
shadowPressedColor: "#B32D00"
|
|
||||||
releasedColor: "#FF6C3C"
|
|
||||||
pressedColor: "#FF4304"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
LineEdit {
|
|
||||||
id: destinationLine
|
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.top: row.bottom
|
Transfer {
|
||||||
anchors.margins: 12
|
id : transferBasic
|
||||||
fontSize: 15
|
anchors.fill: parent
|
||||||
height: 32
|
}
|
||||||
placeholderText: qsTr("destination...") + translationManager.emptyString
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Text {
|
|
||||||
id: privacyLevelText
|
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
|
||||||
anchors.top: destinationLine.bottom
|
|
||||||
anchors.topMargin: 12
|
|
||||||
|
|
||||||
font.family: "Arial"
|
|
||||||
font.pixelSize: 12
|
|
||||||
color: "#535353"
|
|
||||||
text: qsTr("Privacy level") + translationManager.emptyString
|
|
||||||
}
|
|
||||||
|
|
||||||
PrivacyLevelSmall {
|
|
||||||
id: privacyLevel
|
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.right: parent.right
|
|
||||||
anchors.top: privacyLevelText.bottom
|
|
||||||
anchors.leftMargin: 12
|
|
||||||
anchors.rightMargin: 12
|
|
||||||
anchors.topMargin: 12
|
|
||||||
}
|
|
||||||
|
|
||||||
LineEdit {
|
|
||||||
id: paymentId
|
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.right: parent.right
|
|
||||||
anchors.top: privacyLevel.bottom
|
|
||||||
anchors.margins: 12
|
|
||||||
fontSize: 15
|
|
||||||
height: 32
|
|
||||||
placeholderText: qsTr("payment ID (optional)...") + translationManager.emptyString
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
4
main.qml
4
main.qml
|
@ -133,6 +133,7 @@ ApplicationWindow {
|
||||||
}
|
}
|
||||||
|
|
||||||
middlePanel.paymentClicked.connect(handlePayment);
|
middlePanel.paymentClicked.connect(handlePayment);
|
||||||
|
basicPanel.paymentClicked.connect(handlePayment);
|
||||||
|
|
||||||
|
|
||||||
if (typeof wizard.settings['wallet'] !== 'undefined') {
|
if (typeof wizard.settings['wallet'] !== 'undefined') {
|
||||||
|
@ -397,6 +398,9 @@ ApplicationWindow {
|
||||||
id: basicPanel
|
id: basicPanel
|
||||||
x: 0
|
x: 0
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.right: parent.right
|
||||||
visible: false
|
visible: false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue