add an option to show a text label with the percentage value
in the battery icon. text will be shown bottom-right
of the icon with a background for readability, similar to
unread count for IM or email apps.
code was already there but effectively dead code
Details
- Reviewers
broulik - Group Reviewers
Plasma - Commits
- R120:27ac0b760855: Option to show percentage charge in the icon
R871:27ac0b760855: Option to show percentage charge in the icon
tried both with and without label
Diff Detail
- Repository
- R120 Plasma Workspace
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Nifty. That I haven't thought of that kind of placement before. I always wanted some crappy overlay like we had before.
Can you please check again with opacity mask instead of just overlaying a Rectangle. Also, what's up with the Canvas thing?
applets/batterymonitor/package/contents/config/main.xml | ||
---|---|---|
12 | I think this could even be the default? | |
applets/batterymonitor/package/contents/ui/CompactRepresentation.qml | ||
71–72 | for fonts avoid vertically anchoring it, use verticalAlignment instead to ensure descenders are properly taken into account | |
71–72 | Can you instead try an OpacityMask / ShaderEffect thing like I did in task manager for the badge so we actually cut out a piece of the icon instead of just overlaying an opaque rectangle? | |
applets/batterymonitor/package/contents/ui/CompactRepresentationCircle.qml | ||
54 ↗ | (On Diff #8788) | ;) |
eew, sorry, that canvas thing was from an old experiment i did for a possible alternative graphics, which i forgot to kill ;)
applets/batterymonitor/package/contents/config/main.xml | ||
---|---|---|
12 | not sure it's pretty enough for default (yet?), in the end may give some problems (like covering the red x that shows up when the battery is removed, that's rare in modern laptops, but still) | |
applets/batterymonitor/package/contents/ui/CompactRepresentation.qml | ||
71–72 | sure |
applets/batterymonitor/package/contents/ui/BadgeOverlay.qml | ||
---|---|---|
32 | just use anchors? |