diff --git a/Modules/energy/package/contents/ui/main.qml b/Modules/energy/package/contents/ui/main.qml --- a/Modules/energy/package/contents/ui/main.qml +++ b/Modules/energy/package/contents/ui/main.qml @@ -54,15 +54,15 @@ title: i18n("Battery"), data: [ {label: i18n("Rechargeable"), value: "rechargeable"}, - {label: i18n("Charge state"), value: "chargeState", modifier: "chargeState"} + {label: i18n("Charge state"), value: "chargeState", modifier: "chargeState"}, + {label: i18n("Capacity degradation"), value: "capacity", unit: i18n("%"), precision: 0} ] }, { title: i18n("Energy"), data: [ {label: i18nc("current power draw from the battery in W", "Consumption"), value: "energyRate", unit: i18nc("Watt", "W"), precision: 2}, {label: i18n("Voltage"), value: "voltage", unit: i18nc("Volt", "V"), precision: 2}, - {label: i18n("Capacity"), value: "capacity", unit: i18n("%"), precision: 0}, {label: i18n("Remaining energy"), value: "energy", unit: i18nc("Watt-hours", "Wh"), precision: 2}, {label: i18n("Last full"), value: "energyFull", unit: i18nc("Watt-hours", "Wh"), precision: 2}, {label: i18n("Full design"), value: "energyFullDesign", unit: i18nc("Watt-hours", "Wh"), precision: 2} @@ -430,6 +430,12 @@ text: { var value = currentBattery[modelData.value] + // There's no "degradation" value we can look up, so + // instead, process the capacity value to produce it + if (modelData.value == "capacity") { + value = 100 - value + } + if (typeof value === "boolean") { if (value) { return i18n("Yes")