From ce5b6499fd28bc320bd52f87c893bd1b6cf82107 Mon Sep 17 00:00:00 2001 From: Sander van Grieken Date: Mon, 6 Mar 2023 11:43:32 +0100 Subject: [PATCH] qml: styling fixes --- electrum/gui/qml/components/ReceiveDetailsDialog.qml | 5 ++++- electrum/gui/qml/components/controls/BalanceSummary.qml | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/electrum/gui/qml/components/ReceiveDetailsDialog.qml b/electrum/gui/qml/components/ReceiveDetailsDialog.qml index 0af10e72d..290e6593e 100644 --- a/electrum/gui/qml/components/ReceiveDetailsDialog.qml +++ b/electrum/gui/qml/components/ReceiveDetailsDialog.qml @@ -45,7 +45,7 @@ ElDialog { Layout.columnSpan: 4 Layout.fillWidth: true - visible: Daemon.currentWallet.lightningCanReceive + visible: !Daemon.currentWallet.lightningCanReceive.isEmpty RowLayout { width: parent.width @@ -55,6 +55,8 @@ ElDialog { font.pixelSize: constants.fontSizeSmall color: Material.accentColor wrapMode: Text.Wrap + // try to fill/wrap in remaining space + Layout.preferredWidth: Math.min(implicitWidth, parent.width - 2*parent.spacing - constants.iconSizeSmall - lnMaxAmount.implicitWidth) } Image { Layout.preferredWidth: constants.iconSizeSmall @@ -62,6 +64,7 @@ ElDialog { source: '../../icons/lightning.png' } FormattedAmount { + id: lnMaxAmount amount: Daemon.currentWallet.lightningCanReceive } } diff --git a/electrum/gui/qml/components/controls/BalanceSummary.qml b/electrum/gui/qml/components/controls/BalanceSummary.qml index ecced5d63..6a954ed0f 100644 --- a/electrum/gui/qml/components/controls/BalanceSummary.qml +++ b/electrum/gui/qml/components/controls/BalanceSummary.qml @@ -39,6 +39,7 @@ Item { } Label { + Layout.alignment: Qt.AlignRight font.pixelSize: constants.fontSizeXLarge font.family: FixedFont text: formattedTotalBalance