Hide unavailable health/temp data
This commit is contained in:
parent
645d919457
commit
c6f9000aa9
1 changed files with 2 additions and 0 deletions
|
@ -177,10 +177,12 @@ Page {
|
|||
MyDetailItem {
|
||||
label: qsTr("Health:")
|
||||
value: healthText[battery.health]
|
||||
visible: value !== "unknown"
|
||||
}
|
||||
MyDetailItem {
|
||||
label: qsTr("Temperature:")
|
||||
value: battery.temperature === 0x7FFFFFFF ? healthText["unknown"] : formatTemperature(battery.temperature)
|
||||
visible: battery.temperature !== 0x7FFFFFFF
|
||||
|
||||
function formatTemperature(temp) {
|
||||
if(Qt.locale().measurementSystem === Locale.ImperialUSSystem) {
|
||||
|
|
Loading…
Reference in a new issue