From d85ee1b639d848210bdf710ae95dbec2939b0016 Mon Sep 17 00:00:00 2001 From: Sander van Grieken Date: Fri, 24 Feb 2023 22:09:44 +0100 Subject: [PATCH] qml: move max ln receive to ReceiveDetailsDialog, always show invoice fields on ReceiveDialog --- .../qml/components/ReceiveDetailsDialog.qml | 26 +++++++++++++++++++ electrum/gui/qml/components/ReceiveDialog.qml | 24 +---------------- 2 files changed, 27 insertions(+), 23 deletions(-) diff --git a/electrum/gui/qml/components/ReceiveDetailsDialog.qml b/electrum/gui/qml/components/ReceiveDetailsDialog.qml index eb8ad4fcc..0af10e72d 100644 --- a/electrum/gui/qml/components/ReceiveDetailsDialog.qml +++ b/electrum/gui/qml/components/ReceiveDetailsDialog.qml @@ -41,6 +41,32 @@ ElDialog { columnSpacing: constants.paddingSmall columns: 4 + TextHighlightPane { + Layout.columnSpan: 4 + Layout.fillWidth: true + + visible: Daemon.currentWallet.lightningCanReceive + + RowLayout { + width: parent.width + spacing: constants.paddingXSmall + Label { + text: qsTr('Max amount over Lightning') + font.pixelSize: constants.fontSizeSmall + color: Material.accentColor + wrapMode: Text.Wrap + } + Image { + Layout.preferredWidth: constants.iconSizeSmall + Layout.preferredHeight: constants.iconSizeSmall + source: '../../icons/lightning.png' + } + FormattedAmount { + amount: Daemon.currentWallet.lightningCanReceive + } + } + } + Label { text: qsTr('Message') } diff --git a/electrum/gui/qml/components/ReceiveDialog.qml b/electrum/gui/qml/components/ReceiveDialog.qml index 52cc2a87b..f220c6bb3 100644 --- a/electrum/gui/qml/components/ReceiveDialog.qml +++ b/electrum/gui/qml/components/ReceiveDialog.qml @@ -182,25 +182,6 @@ ElDialog { } } - RowLayout { - Layout.alignment: Qt.AlignHCenter - visible: Daemon.currentWallet.isLightning - spacing: constants.paddingXSmall - Image { - Layout.preferredWidth: constants.iconSizeSmall - Layout.preferredHeight: constants.iconSizeSmall - source: '../../icons/lightning.png' - } - Label { - text: qsTr('can receive:') - font.pixelSize: constants.fontSizeSmall - color: Material.accentColor - } - FormattedAmount { - amount: Daemon.currentWallet.lightningCanReceive - } - } - Rectangle { height: 1 Layout.alignment: Qt.AlignHCenter @@ -221,23 +202,20 @@ ElDialog { text: request.status_str } Label { - visible: request.message text: qsTr('Message') color: Material.accentColor } Label { - visible: request.message Layout.fillWidth: true text: request.message wrapMode: Text.Wrap } Label { - visible: !request.amount.isEmpty text: qsTr('Amount') color: Material.accentColor } FormattedAmount { - visible: !request.amount.isEmpty + valid: !request.amount.isEmpty amount: request.amount } }