icons, buttons, receivedialog lifecycle
This commit is contained in:
@@ -17,8 +17,9 @@ ElDialog {
|
||||
|
||||
parent: Overlay.overlay
|
||||
modal: true
|
||||
x: (parent.width - width) / 2
|
||||
y: (parent.height - height) / 2
|
||||
|
||||
anchors.centerIn: parent
|
||||
|
||||
Overlay.modal: Rectangle {
|
||||
color: "#aa000000"
|
||||
}
|
||||
|
||||
@@ -37,17 +37,17 @@ ElDialog {
|
||||
State {
|
||||
name: 'bolt11'
|
||||
PropertyChanges { target: qrloader; sourceComponent: qri_bolt11 }
|
||||
PropertyChanges { target: bolt11label; font.bold: true }
|
||||
PropertyChanges { target: bolt11label; font.bold: true; color: Material.accentColor }
|
||||
},
|
||||
State {
|
||||
name: 'bip21uri'
|
||||
PropertyChanges { target: qrloader; sourceComponent: qri_bip21uri }
|
||||
PropertyChanges { target: bip21label; font.bold: true }
|
||||
PropertyChanges { target: bip21label; font.bold: true; color: Material.accentColor }
|
||||
},
|
||||
State {
|
||||
name: 'address'
|
||||
PropertyChanges { target: qrloader; sourceComponent: qri_address }
|
||||
PropertyChanges { target: addresslabel; font.bold: true }
|
||||
PropertyChanges { target: addresslabel; font.bold: true; color: Material.accentColor }
|
||||
}
|
||||
]
|
||||
|
||||
@@ -67,6 +67,7 @@ ElDialog {
|
||||
|
||||
Loader {
|
||||
id: qrloader
|
||||
|
||||
Component {
|
||||
id: qri_bolt11
|
||||
QRImage {
|
||||
@@ -153,7 +154,7 @@ ElDialog {
|
||||
|
||||
RowLayout {
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
Button {
|
||||
FlatButton {
|
||||
icon.source: '../../icons/copy_bw.png'
|
||||
icon.color: 'transparent'
|
||||
text: 'Copy'
|
||||
@@ -166,7 +167,7 @@ ElDialog {
|
||||
AppController.textToClipboard(_address)
|
||||
}
|
||||
}
|
||||
Button {
|
||||
FlatButton {
|
||||
icon.source: '../../icons/share.png'
|
||||
text: 'Share'
|
||||
onClicked: {
|
||||
@@ -181,13 +182,14 @@ ElDialog {
|
||||
enabled = true
|
||||
}
|
||||
}
|
||||
FlatButton {
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
icon.source: '../../icons/pen.png'
|
||||
text: qsTr('Edit')
|
||||
onClicked: receiveDetailsDialog.open()
|
||||
}
|
||||
}
|
||||
|
||||
Button {
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
text: qsTr('Edit')
|
||||
onClicked: receiveDetailsDialog.open()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -37,6 +37,7 @@ ElDialog {
|
||||
|
||||
FlatButton {
|
||||
Layout.fillWidth: true
|
||||
icon.source: '../../icons/pen.png'
|
||||
text: qsTr('Manual input')
|
||||
onClicked: {
|
||||
var _mid = manualInputDialog.createObject(mainView)
|
||||
@@ -50,6 +51,7 @@ ElDialog {
|
||||
|
||||
FlatButton {
|
||||
Layout.fillWidth: true
|
||||
icon.source: '../../icons/paste.png'
|
||||
text: qsTr('Paste from clipboard')
|
||||
onClicked: invoiceParser.recipient = AppController.clipboardToText()
|
||||
}
|
||||
|
||||
@@ -110,6 +110,7 @@ Item {
|
||||
FlatButton {
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredWidth: 1
|
||||
icon.source: '../../icons/tab_send.png'
|
||||
text: qsTr('Send')
|
||||
onClicked: {
|
||||
console.log('send')
|
||||
@@ -127,10 +128,10 @@ Item {
|
||||
FlatButton {
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredWidth: 1
|
||||
icon.source: '../../icons/tab_receive.png'
|
||||
text: qsTr('Receive')
|
||||
onClicked: {
|
||||
var comp = Qt.createComponent(Qt.resolvedUrl('ReceiveDialog.qml'))
|
||||
var dialog = comp.createObject(mainView)
|
||||
var dialog = receiveDialog.createObject(mainView)
|
||||
dialog.open()
|
||||
}
|
||||
}
|
||||
@@ -218,6 +219,13 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
Component {
|
||||
id: receiveDialog
|
||||
ReceiveDialog {
|
||||
onClosed: destroy()
|
||||
}
|
||||
}
|
||||
|
||||
Component {
|
||||
id: confirmPaymentDialog
|
||||
ConfirmTxDialog {
|
||||
|
||||
@@ -1,24 +1,6 @@
|
||||
import QtQuick 2.6
|
||||
import QtQuick.Controls 2.15
|
||||
|
||||
Item {
|
||||
id: root
|
||||
|
||||
property alias text: buttonLabel.text
|
||||
property alias font: buttonLabel.font
|
||||
|
||||
signal clicked
|
||||
|
||||
implicitWidth: buttonLabel.width + constants.paddingXXLarge
|
||||
implicitHeight: buttonLabel.height + constants.paddingXXLarge
|
||||
|
||||
Label {
|
||||
id: buttonLabel
|
||||
anchors.centerIn: parent
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: root
|
||||
onClicked: root.clicked()
|
||||
}
|
||||
TabButton {
|
||||
checkable: false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user