Merge PR #688: More smaller fixes in energy views
This commit is contained in:
commit
a7c53a443b
@ -74,7 +74,7 @@ ThingPageBase {
|
|||||||
|
|
||||||
Label {
|
Label {
|
||||||
font: Style.largeFont
|
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
|
width: parent.width
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
}
|
}
|
||||||
|
|||||||
@ -138,7 +138,7 @@ ThingPageBase {
|
|||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
font: Style.largeFont
|
font: Style.largeFont
|
||||||
property bool toKilos: currentPower >= 1000
|
property bool toKilos: Math.abs(currentPower) >= 1000
|
||||||
property double value: Math.abs(currentPower / (toKilos ? 1000 : 1))
|
property double value: Math.abs(currentPower / (toKilos ? 1000 : 1))
|
||||||
text: "%1 %2".arg(value.toFixed(toKilos ? 2 : 1)).arg(toKilos ? "kW" : "W")
|
text: "%1 %2".arg(value.toFixed(toKilos ? 2 : 1)).arg(toKilos ? "kW" : "W")
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user