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