Browse Source

qml: BalanceSummary only show Lightning values when wallet is lightning

Sander van Grieken 3 years ago
parent
commit
d6faeb411a
  1. 18
      electrum/gui/qml/components/controls/BalanceSummary.qml

18
electrum/gui/qml/components/controls/BalanceSummary.qml

@ -69,6 +69,7 @@ Item {
text: Daemon.fx.fiatCurrency text: Daemon.fx.fiatCurrency
} }
RowLayout { RowLayout {
visible: Daemon.currentWallet.isLightning
Image { Image {
Layout.preferredWidth: constants.iconSizeSmall Layout.preferredWidth: constants.iconSizeSmall
Layout.preferredHeight: constants.iconSizeSmall Layout.preferredHeight: constants.iconSizeSmall
@ -81,35 +82,38 @@ Item {
} }
} }
Label { Label {
visible: Daemon.currentWallet.isLightning
Layout.alignment: Qt.AlignRight Layout.alignment: Qt.AlignRight
text: formattedLightningCanReceive text: formattedLightningCanReceive
font.family: FixedFont font.family: FixedFont
} }
Label { Label {
visible: Daemon.currentWallet.isLightning
font.pixelSize: constants.fontSizeSmall font.pixelSize: constants.fontSizeSmall
color: Material.accentColor color: Material.accentColor
text: Config.baseUnit text: Config.baseUnit
} }
Item { Item {
visible: Daemon.fx.enabled visible: Daemon.currentWallet.isLightning && Daemon.fx.enabled
Layout.preferredHeight: 1 Layout.preferredHeight: 1
Layout.preferredWidth: 1 Layout.preferredWidth: 1
} }
Label { Label {
Layout.alignment: Qt.AlignRight Layout.alignment: Qt.AlignRight
visible: Daemon.fx.enabled visible: Daemon.currentWallet.isLightning && Daemon.fx.enabled
font.pixelSize: constants.fontSizeSmall font.pixelSize: constants.fontSizeSmall
color: constants.mutedForeground color: constants.mutedForeground
text: formattedLightningCanReceiveFiat text: formattedLightningCanReceiveFiat
} }
Label { Label {
visible: Daemon.fx.enabled visible: Daemon.currentWallet.isLightning && Daemon.fx.enabled
font.pixelSize: constants.fontSizeSmall font.pixelSize: constants.fontSizeSmall
color: constants.mutedForeground color: constants.mutedForeground
text: Daemon.fx.fiatCurrency text: Daemon.fx.fiatCurrency
} }
RowLayout { RowLayout {
visible: Daemon.currentWallet.isLightning
Image { Image {
Layout.preferredWidth: constants.iconSizeSmall Layout.preferredWidth: constants.iconSizeSmall
Layout.preferredHeight: constants.iconSizeSmall Layout.preferredHeight: constants.iconSizeSmall
@ -122,29 +126,31 @@ Item {
} }
} }
Label { Label {
visible: Daemon.currentWallet.isLightning
Layout.alignment: Qt.AlignRight Layout.alignment: Qt.AlignRight
text: formattedLightningCanSend text: formattedLightningCanSend
font.family: FixedFont font.family: FixedFont
} }
Label { Label {
visible: Daemon.currentWallet.isLightning
font.pixelSize: constants.fontSizeSmall font.pixelSize: constants.fontSizeSmall
color: Material.accentColor color: Material.accentColor
text: Config.baseUnit text: Config.baseUnit
} }
Item { Item {
visible: Daemon.fx.enabled visible: Daemon.currentWallet.isLightning && Daemon.fx.enabled
Layout.preferredHeight: 1 Layout.preferredHeight: 1
Layout.preferredWidth: 1 Layout.preferredWidth: 1
} }
Label { Label {
Layout.alignment: Qt.AlignRight Layout.alignment: Qt.AlignRight
visible: Daemon.fx.enabled visible: Daemon.currentWallet.isLightning && Daemon.fx.enabled
font.pixelSize: constants.fontSizeSmall font.pixelSize: constants.fontSizeSmall
color: constants.mutedForeground color: constants.mutedForeground
text: formattedLightningCanSendFiat text: formattedLightningCanSendFiat
} }
Label { Label {
visible: Daemon.fx.enabled visible: Daemon.currentWallet.isLightning && Daemon.fx.enabled
font.pixelSize: constants.fontSizeSmall font.pixelSize: constants.fontSizeSmall
color: constants.mutedForeground color: constants.mutedForeground
text: Daemon.fx.fiatCurrency text: Daemon.fx.fiatCurrency

Loading…
Cancel
Save