More smaller fixes in energy views
This commit is contained in:
parent
104ad8483f
commit
00f084c8b9
@ -74,7 +74,7 @@ ThingPageBase {
|
||||
|
||||
Label {
|
||||
font: Style.largeFont
|
||||
text: "%1 %2".arg(root.maxChargingCurrentState.value).arg(Types.toUiUnit(root.maxChargingCurrentStateType.unit))
|
||||
text: "%1 %2".arg(root.maxChargingCurrentState.value.toFixed(1)).arg(Types.toUiUnit(root.maxChargingCurrentStateType.unit))
|
||||
width: parent.width
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
}
|
||||
|
||||
@ -138,7 +138,7 @@ ThingPageBase {
|
||||
Layout.fillWidth: true
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
font: Style.largeFont
|
||||
property bool toKilos: currentPower >= 1000
|
||||
property bool toKilos: Math.abs(currentPower) >= 1000
|
||||
property double value: Math.abs(currentPower / (toKilos ? 1000 : 1))
|
||||
text: "%1 %2".arg(value.toFixed(toKilos ? 2 : 1)).arg(toKilos ? "kW" : "W")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user