Ensure no decimals in supply level rendering

This commit is contained in:
Anton Thomasson 2022-06-13 20:45:46 +02:00
parent 813e1edb6a
commit 0874122bda

View file

@ -26,7 +26,7 @@ import "../components"
{ {
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
width: Theme.itemSizeExtraSmall width: Theme.itemSizeExtraSmall
text: ""+(100*value_fraction)+"%" text: ""+Math.round(100*value_fraction)+"%"
color: level <= low_level ? "red" : Theme.highlightColor color: level <= low_level ? "red" : Theme.highlightColor
font.pixelSize: Theme.fontSizeExtraSmall font.pixelSize: Theme.fontSizeExtraSmall
} }