This commit is contained in:
Flummi 2024-01-19 02:57:49 +01:00
parent 2d04bddde9
commit 4cea131ed0
Signed by: Flummi
GPG Key ID: AA2AEF822A6F4817

View File

@ -31,8 +31,8 @@ Item {
smooth: true
fillMode: Image.PreserveAspectFit
source: batteryIcon()
Plasmoid.toolTipMainText: "battery status:"
Plasmoid.toolTipSubText: batteryStatus()
Plasmoid.toolTipMainText: "battery level: " + batteryLevel()
Plasmoid.toolTipSubText: "polling rate: " + pollingrate + " seconds"
}
function batteryIcon() {
@ -54,7 +54,7 @@ Item {
return "../icons/" + iconName + ".png";
}
function batteryStatus() {
function batteryLevel() {
if(batteryPercent == -1)
return "charging";
else if(batteryPercent == -2)