From af61b9d86b89c2fe381a66d53febace187c56fe2 Mon Sep 17 00:00:00 2001 From: Sander van Grieken Date: Wed, 1 Nov 2023 11:38:47 +0100 Subject: [PATCH] qml: also add share option for fallback address in InvoiceDialog --- electrum/gui/qml/components/InvoiceDialog.qml | 26 ++++++++++++++----- 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/electrum/gui/qml/components/InvoiceDialog.qml b/electrum/gui/qml/components/InvoiceDialog.qml index 15725ca86..48f9c1a83 100644 --- a/electrum/gui/qml/components/InvoiceDialog.qml +++ b/electrum/gui/qml/components/InvoiceDialog.qml @@ -96,8 +96,7 @@ ElDialog { var dialog = app.genericShareDialog.createObject(app, { title: qsTr('Address'), text: invoice.address - } - ) + }) dialog.open() } } @@ -390,11 +389,26 @@ ElDialog { Layout.fillWidth: true visible: invoice.invoiceType == Invoice.LightningInvoice && invoice.address leftPadding: constants.paddingMedium - Label { + + RowLayout { width: parent.width - text: invoice.address - font.family: FixedFont - wrapMode: Text.Wrap + Label { + text: invoice.address + font.family: FixedFont + Layout.fillWidth: true + wrapMode: Text.Wrap + } + ToolButton { + icon.source: '../../icons/share.png' + icon.color: 'transparent' + onClicked: { + var dialog = app.genericShareDialog.createObject(app, { + title: qsTr('Address'), + text: invoice.address + }) + dialog.open() + } + } } } }