1
0

use configured units everywhere

This commit is contained in:
Sander van Grieken
2022-03-23 14:00:46 +01:00
parent 5cfa1fd772
commit a75960a70d
4 changed files with 196 additions and 50 deletions

View File

@@ -59,8 +59,9 @@ Pane {
color: model.label !== '' ? Material.accentColor : 'gray'
}
Label {
id: valueLabel
font.pixelSize: 15
text: model.bc_value
text: Config.formatSats(model.bc_value)
font.bold: true
color: model.incoming ? "#ff80ff80" : "#ffff8080"
}
@@ -112,6 +113,19 @@ Pane {
}
}
// as the items in the model are not bindings to QObjects,
// hook up events that might change the appearance
Connections {
target: Config
function onBaseUnitChanged() {
valueLabel.text = Config.formatSats(model.bc_value)
}
function onThousandsSeparatorChanged() {
valueLabel.text = Config.formatSats(model.bc_value)
}
}
} // delegate
}