Merge PR #686: Align font sizes across energy views

This commit is contained in:
Jenkins nymea 2021-10-01 10:42:55 +02:00
commit b0b2f91aab
2 changed files with 12 additions and 9 deletions

View File

@ -70,13 +70,6 @@ ThingPageBase {
anchors.centerIn: parent
width: background.contentItem.width * .6
spacing: Style.margins
Label {
text: qsTr("Maximum charging current")
font: Style.smallFont
width: parent.width
horizontalAlignment: Text.AlignHCenter
wrapMode: Text.WordWrap
}
Label {
font: Style.largeFont
@ -84,6 +77,14 @@ ThingPageBase {
width: parent.width
horizontalAlignment: Text.AlignHCenter
}
Label {
text: qsTr("Maximum charging current")
font: Style.smallFont
width: parent.width
horizontalAlignment: Text.AlignHCenter
wrapMode: Text.WordWrap
}
}
Dial {

View File

@ -140,11 +140,12 @@ ThingPageBase {
Label {
Layout.fillWidth: true
horizontalAlignment: Text.AlignHCenter
font: Style.hugeFont
font: Style.largeFont
property bool toKilos: currentPower >= 1000
property double value: Math.abs(currentPower / (toKilos ? 1000 : 1))
text: "%1 %2".arg(value.toFixed(toKilos ? 2 : 1)).arg(toKilos ? "kW" : "W")
}
Label {
Layout.fillWidth: true
horizontalAlignment: Text.AlignHCenter
@ -171,10 +172,11 @@ ThingPageBase {
font: Style.smallFont
}
Label {
Layout.fillWidth: true
horizontalAlignment: Text.AlignHCenter
font: Style.hugeFont
font: Style.bigFont
visible: batteryLevelState
text: "%1 %".arg(batteryLevelState ? batteryLevelState.value : "")
}