use BarLabel instead of Text

This commit is contained in:
Damocles 2026-04-12 14:52:23 +02:00
parent ed72d81f3b
commit 6f80224d6c
5 changed files with 14 additions and 24 deletions

View file

@ -57,11 +57,9 @@ M.BarSection {
color: M.Theme.base08
anchors.verticalCenter: parent.verticalCenter
}
Text {
text: root.usage.toString().padStart(2) + "%@" + root.freqGhz.toFixed(2)
M.BarLabel {
label: root.usage.toString().padStart(2) + "%@" + root.freqGhz.toFixed(2)
color: M.Theme.base08
font.pixelSize: M.Theme.fontSize
font.family: M.Theme.fontFamily
verticalAlignment: Text.AlignVCenter
anchors.verticalCenter: parent.verticalCenter
}
}

View file

@ -37,11 +37,9 @@ M.BarSection {
color: M.Theme.base09
anchors.verticalCenter: parent.verticalCenter
}
Text {
text: root.freePct + "% " + root.totalTb.toFixed(1)
M.BarLabel {
label: root.freePct + "% " + root.totalTb.toFixed(1)
color: M.Theme.base09
font.pixelSize: M.Theme.fontSize
font.family: M.Theme.fontFamily
verticalAlignment: Text.AlignVCenter
anchors.verticalCenter: parent.verticalCenter
}
}

View file

@ -37,11 +37,9 @@ M.BarSection {
color: M.Theme.base0B
anchors.verticalCenter: parent.verticalCenter
}
Text {
text: root.percent + "%"
M.BarLabel {
label: root.percent + "%"
color: M.Theme.base0B
font.pixelSize: M.Theme.fontSize
font.family: M.Theme.fontFamily
verticalAlignment: Text.AlignVCenter
anchors.verticalCenter: parent.verticalCenter
}
}

View file

@ -64,12 +64,10 @@ M.BarSection {
color: root.state === "disconnected" ? M.Theme.base08 : M.Theme.base0C
anchors.verticalCenter: parent.verticalCenter
}
Text {
M.BarLabel {
visible: root.state === "wifi"
text: root.essid
label: root.essid
color: root.state === "disconnected" ? M.Theme.base08 : M.Theme.base0C
font.pixelSize: M.Theme.fontSize + 1
font.family: M.Theme.fontFamily
anchors.verticalCenter: parent.verticalCenter
}
}

View file

@ -29,11 +29,9 @@ M.BarSection {
color: root._stateColor
anchors.verticalCenter: parent.verticalCenter
}
Text {
text: root.celsius + "\u00B0C"
M.BarLabel {
label: root.celsius + "\u00B0C"
color: root._stateColor
font.pixelSize: M.Theme.fontSize
font.family: M.Theme.fontFamily
verticalAlignment: Text.AlignVCenter
anchors.verticalCenter: parent.verticalCenter
}
}