Browse Source

qml: styling TxDetails

master
Sander van Grieken 3 years ago
parent
commit
be371c8d88
  1. 37
      electrum/gui/qml/components/TxDetails.qml

37
electrum/gui/qml/components/TxDetails.qml

@ -74,7 +74,6 @@ Pane {
} }
Label { Label {
Layout.fillWidth: true
visible: !txdetails.isUnrelated && txdetails.lnAmount.satsInt == 0 visible: !txdetails.isUnrelated && txdetails.lnAmount.satsInt == 0
text: txdetails.amount.satsInt > 0 text: txdetails.amount.satsInt > 0
? qsTr('Amount received') ? qsTr('Amount received')
@ -92,23 +91,11 @@ Pane {
wrapMode: Text.Wrap wrapMode: Text.Wrap
} }
RowLayout { FormattedAmount {
visible: !txdetails.isUnrelated visible: !txdetails.isUnrelated
Layout.fillWidth: true Layout.fillWidth: true
Label { showAlt: false
visible: txdetails.lnAmount.satsInt == 0 amount: txdetails.lnAmount.isEmpty ? txdetails.amount : txdetails.lnAmount
text: Config.formatSats(txdetails.amount)
font.family: FixedFont
}
Label {
visible: txdetails.lnAmount.satsInt != 0
text: Config.formatSats(txdetails.lnAmount)
font.family: FixedFont
}
Label {
text: Config.baseUnit
color: Material.accentColor
}
} }
Item { Item {
@ -127,25 +114,22 @@ Pane {
Label { Label {
Layout.fillWidth: true visible: !txdetails.fee.isEmpty
visible: txdetails.fee.satsInt != 0
text: qsTr('Transaction fee') text: qsTr('Transaction fee')
color: Material.accentColor color: Material.accentColor
} }
RowLayout { RowLayout {
Layout.fillWidth: true Layout.fillWidth: true
visible: txdetails.fee.satsInt != 0 visible: !txdetails.fee.isEmpty
Label { FormattedAmount {
text: Config.formatSats(txdetails.fee)
font.family: FixedFont
}
Label {
Layout.fillWidth: true Layout.fillWidth: true
text: Config.baseUnit amount: txdetails.fee
color: Material.accentColor showAlt: false
} }
FlatButton { FlatButton {
Layout.fillWidth: true
Layout.minimumWidth: implicitWidth
icon.source: '../../icons/warning.png' icon.source: '../../icons/warning.png'
icon.color: 'transparent' icon.color: 'transparent'
text: qsTr('Bump fee') text: qsTr('Bump fee')
@ -162,6 +146,7 @@ Pane {
} }
Label { Label {
Layout.fillWidth: true
text: qsTr('Status') text: qsTr('Status')
color: Material.accentColor color: Material.accentColor
} }

Loading…
Cancel
Save