tooltip
This commit is contained in:
parent
2d04bddde9
commit
4cea131ed0
|
@ -31,8 +31,8 @@ Item {
|
||||||
smooth: true
|
smooth: true
|
||||||
fillMode: Image.PreserveAspectFit
|
fillMode: Image.PreserveAspectFit
|
||||||
source: batteryIcon()
|
source: batteryIcon()
|
||||||
Plasmoid.toolTipMainText: "battery status:"
|
Plasmoid.toolTipMainText: "battery level: " + batteryLevel()
|
||||||
Plasmoid.toolTipSubText: batteryStatus()
|
Plasmoid.toolTipSubText: "polling rate: " + pollingrate + " seconds"
|
||||||
}
|
}
|
||||||
|
|
||||||
function batteryIcon() {
|
function batteryIcon() {
|
||||||
|
@ -54,13 +54,13 @@ Item {
|
||||||
return "../icons/" + iconName + ".png";
|
return "../icons/" + iconName + ".png";
|
||||||
}
|
}
|
||||||
|
|
||||||
function batteryStatus() {
|
function batteryLevel() {
|
||||||
if(batteryPercent == -1)
|
if(batteryPercent == -1)
|
||||||
return "charging";
|
return "charging";
|
||||||
else if(batteryPercent == -2)
|
else if(batteryPercent == -2)
|
||||||
return "not connected";
|
return "not connected";
|
||||||
else
|
else
|
||||||
return batteryPercent + " %";
|
return batteryPercent + "%";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user