1
0

follow-up: factor out more hardcoded "sat/byte" and "sat/b" strings

- rename globals
- also rm hardcoded strings from qml
- use consistent unit names in qml
  (previously mixed sat/vB and sat/byte (latter coming from core lib))
This commit is contained in:
SomberNight
2024-02-03 05:13:09 +00:00
parent 13a421aabb
commit a9a8ed2eb4
13 changed files with 36 additions and 24 deletions

View File

@@ -100,7 +100,10 @@ Pane {
Layout.fillWidth: true
height: parent.height
color: Qt.hsva(2/3-(2/3*(Math.log(Math.min(600, modelData[0]))/Math.log(600))), 0.8, 1, 1)
ToolTip.text: modelData[0] + " sat/vB around depth " + (modelData[2]/1000000).toFixed(2) + " MB"
ToolTip.text: (qsTr("%1 around depth %2")
.arg(modelData[0] + " " + UI_UNIT_NAME.FEERATE_SAT_PER_VB)
.arg((modelData[2]/1000000).toFixed(2) + " " + UI_UNIT_NAME.MEMPOOL_MB)
)
ToolTip.visible: ma.containsMouse
MouseArea {
id: ma
@@ -144,14 +147,14 @@ Pane {
RowLayout {
Layout.fillWidth: true
Label {
text: '<-- ' + qsTr('%1 sat/vB').arg(Math.ceil(Network.feeHistogram.max_fee))
text: '<-- ' + Math.ceil(Network.feeHistogram.max_fee) + " " + UI_UNIT_NAME.FEERATE_SAT_PER_VB
font.pixelSize: constants.fontSizeXSmall
color: Material.accentColor
}
Label {
Layout.fillWidth: true
horizontalAlignment: Text.AlignRight
text: qsTr('%1 sat/vB').arg(Math.floor(Network.feeHistogram.min_fee)) + ' -->'
text: Math.floor(Network.feeHistogram.min_fee) + " " + UI_UNIT_NAME.FEERATE_SAT_PER_VB + ' -->'
font.pixelSize: constants.fontSizeXSmall
color: Material.accentColor
}