From d6faeb411ad866ab6f17d67b096399738bb15b94 Mon Sep 17 00:00:00 2001 From: Sander van Grieken Date: Fri, 27 Jan 2023 12:21:44 +0100 Subject: [PATCH] qml: BalanceSummary only show Lightning values when wallet is lightning --- .../qml/components/controls/BalanceSummary.qml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/electrum/gui/qml/components/controls/BalanceSummary.qml b/electrum/gui/qml/components/controls/BalanceSummary.qml index f3c0b51d5..e3ef3afba 100644 --- a/electrum/gui/qml/components/controls/BalanceSummary.qml +++ b/electrum/gui/qml/components/controls/BalanceSummary.qml @@ -69,6 +69,7 @@ Item { text: Daemon.fx.fiatCurrency } RowLayout { + visible: Daemon.currentWallet.isLightning Image { Layout.preferredWidth: constants.iconSizeSmall Layout.preferredHeight: constants.iconSizeSmall @@ -81,35 +82,38 @@ Item { } } Label { + visible: Daemon.currentWallet.isLightning Layout.alignment: Qt.AlignRight text: formattedLightningCanReceive font.family: FixedFont } Label { + visible: Daemon.currentWallet.isLightning font.pixelSize: constants.fontSizeSmall color: Material.accentColor text: Config.baseUnit } Item { - visible: Daemon.fx.enabled + visible: Daemon.currentWallet.isLightning && Daemon.fx.enabled Layout.preferredHeight: 1 Layout.preferredWidth: 1 } Label { Layout.alignment: Qt.AlignRight - visible: Daemon.fx.enabled + visible: Daemon.currentWallet.isLightning && Daemon.fx.enabled font.pixelSize: constants.fontSizeSmall color: constants.mutedForeground text: formattedLightningCanReceiveFiat } Label { - visible: Daemon.fx.enabled + visible: Daemon.currentWallet.isLightning && Daemon.fx.enabled font.pixelSize: constants.fontSizeSmall color: constants.mutedForeground text: Daemon.fx.fiatCurrency } RowLayout { + visible: Daemon.currentWallet.isLightning Image { Layout.preferredWidth: constants.iconSizeSmall Layout.preferredHeight: constants.iconSizeSmall @@ -122,29 +126,31 @@ Item { } } Label { + visible: Daemon.currentWallet.isLightning Layout.alignment: Qt.AlignRight text: formattedLightningCanSend font.family: FixedFont } Label { + visible: Daemon.currentWallet.isLightning font.pixelSize: constants.fontSizeSmall color: Material.accentColor text: Config.baseUnit } Item { - visible: Daemon.fx.enabled + visible: Daemon.currentWallet.isLightning && Daemon.fx.enabled Layout.preferredHeight: 1 Layout.preferredWidth: 1 } Label { Layout.alignment: Qt.AlignRight - visible: Daemon.fx.enabled + visible: Daemon.currentWallet.isLightning && Daemon.fx.enabled font.pixelSize: constants.fontSizeSmall color: constants.mutedForeground text: formattedLightningCanSendFiat } Label { - visible: Daemon.fx.enabled + visible: Daemon.currentWallet.isLightning && Daemon.fx.enabled font.pixelSize: constants.fontSizeSmall color: constants.mutedForeground text: Daemon.fx.fiatCurrency