From 4d60432064a63930946ea0d91347b469d6db9893 Mon Sep 17 00:00:00 2001 From: Sander van Grieken Date: Sun, 29 Oct 2023 12:32:43 +0100 Subject: [PATCH] qml: add share option for address in InvoiceDialog --- electrum/gui/qml/components/InvoiceDialog.qml | 24 +++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/electrum/gui/qml/components/InvoiceDialog.qml b/electrum/gui/qml/components/InvoiceDialog.qml index eb9ac48bd..15725ca86 100644 --- a/electrum/gui/qml/components/InvoiceDialog.qml +++ b/electrum/gui/qml/components/InvoiceDialog.qml @@ -80,11 +80,27 @@ ElDialog { visible: invoice.invoiceType == Invoice.OnchainInvoice leftPadding: constants.paddingMedium - Label { + RowLayout { width: parent.width - text: invoice.address - font.family: FixedFont - wrapMode: Text.Wrap + Label { + text: invoice.address + font.pixelSize: constants.fontSizeLarge + 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() + } + } } }