diff --git a/electrum/gui/qml/components/MessageDialog.qml b/electrum/gui/qml/components/MessageDialog.qml index 1307b7639..2a7555f54 100644 --- a/electrum/gui/qml/components/MessageDialog.qml +++ b/electrum/gui/qml/components/MessageDialog.qml @@ -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" } diff --git a/electrum/gui/qml/components/ReceiveDialog.qml b/electrum/gui/qml/components/ReceiveDialog.qml index 09ef0768e..dcf8f500c 100644 --- a/electrum/gui/qml/components/ReceiveDialog.qml +++ b/electrum/gui/qml/components/ReceiveDialog.qml @@ -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() - } } diff --git a/electrum/gui/qml/components/SendDialog.qml b/electrum/gui/qml/components/SendDialog.qml index a0af923de..c60e10f17 100644 --- a/electrum/gui/qml/components/SendDialog.qml +++ b/electrum/gui/qml/components/SendDialog.qml @@ -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() } diff --git a/electrum/gui/qml/components/WalletMainView.qml b/electrum/gui/qml/components/WalletMainView.qml index 492c3e870..2f7c6b30f 100644 --- a/electrum/gui/qml/components/WalletMainView.qml +++ b/electrum/gui/qml/components/WalletMainView.qml @@ -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 { diff --git a/electrum/gui/qml/components/controls/FlatButton.qml b/electrum/gui/qml/components/controls/FlatButton.qml index 80c80eae1..30868226c 100644 --- a/electrum/gui/qml/components/controls/FlatButton.qml +++ b/electrum/gui/qml/components/controls/FlatButton.qml @@ -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 }