1
0

qml: refactor most amount values to FormattedAmount, use fixed font more consistently

This commit is contained in:
Sander van Grieken
2023-01-16 13:49:32 +01:00
parent a986e61047
commit f82136d07c
7 changed files with 40 additions and 183 deletions

View File

@@ -93,20 +93,8 @@ Pane {
color: Material.accentColor
}
RowLayout {
Label {
font.family: FixedFont
text: Config.formatSats(channeldetails.capacity)
}
Label {
color: Material.accentColor
text: Config.baseUnit
}
Label {
text: Daemon.fx.enabled
? '(' + Daemon.fx.fiatValue(channeldetails.capacity) + ' ' + Daemon.fx.fiatCurrency + ')'
: ''
}
FormattedAmount {
amount: channeldetails.capacity
}
Label {
@@ -114,22 +102,11 @@ Pane {
color: Material.accentColor
}
RowLayout {
FormattedAmount {
visible: !channeldetails.frozenForSending && channeldetails.isOpen
Label {
font.family: FixedFont
text: Config.formatSats(channeldetails.canSend)
}
Label {
color: Material.accentColor
text: Config.baseUnit
}
Label {
text: Daemon.fx.enabled
? '(' + Daemon.fx.fiatValue(channeldetails.canSend) + ' ' + Daemon.fx.fiatCurrency + ')'
: ''
}
amount: channeldetails.canSend
}
Label {
visible: channeldetails.frozenForSending && channeldetails.isOpen
text: qsTr('n/a (frozen)')
@@ -144,22 +121,11 @@ Pane {
color: Material.accentColor
}
RowLayout {
FormattedAmount {
visible: !channeldetails.frozenForReceiving && channeldetails.isOpen
Label {
font.family: FixedFont
text: Config.formatSats(channeldetails.canReceive)
}
Label {
color: Material.accentColor
text: Config.baseUnit
}
Label {
text: Daemon.fx.enabled
? '(' + Daemon.fx.fiatValue(channeldetails.canReceive) + ' ' + Daemon.fx.fiatCurrency + ')'
: ''
}
amount: channeldetails.canReceive
}
Label {
visible: channeldetails.frozenForReceiving && channeldetails.isOpen
text: qsTr('n/a (frozen)')