don't show 0% when no battery
ClosedPublic

Authored by mart on Feb 14 2017, 12:58 PM.

Details

Summary

if there is no battery don't show 0%, but a - on
the badge. still show the badge to show the option is not broken,
but don't show a weird 0% of a non existing battery

Test Plan

works on both systems with or without battery

Diff Detail

Repository
R120 Plasma Workspace
Branch
phab/batterybadge
Lint
No Linters Available
Unit
No Unit Test Coverage
mart updated this revision to Diff 11328.Feb 14 2017, 12:58 PM
mart retitled this revision from to don't show 0% when no battery.
mart updated this object.
mart edited the test plan for this revision. (Show Details)
mart added a reviewer: Plasma.
Restricted Application added a project: Plasma. · View Herald TranscriptFeb 14 2017, 12:58 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
davidedmundson added inline comments.
applets/batterymonitor/package/contents/ui/BadgeOverlay.qml
36

what's this for?

broulik added inline comments.
applets/batterymonitor/package/contents/ui/CompactRepresentation.qml
74

Please use a – instead of a - and perhaps i18nc so it can be translated to another special character if needed

Does it even make sense to show this thing if there's no battery? We already show a cross on the icon then, don't we? Makes it a bit redundant. On the other hand it could be confusing to have the option checked but then have it not do anything – maybe the check box needs to be grayed out in case there's no battery.

mart added a comment.Feb 15 2017, 11:36 AM

Does it even make sense to show this thing if there's no battery? We already show a cross on the icon then, don't we? Makes it a bit redundant. On the other hand it could be confusing to have the option checked but then have it not do anything – maybe the check box needs to be grayed out in case there's no battery.

the idea was to stilòl have the badge show up to not make that option look "broken". tough also having the checkbox greyed out makes sense too

applets/batterymonitor/package/contents/ui/BadgeOverlay.qml
36

to keep it large enough to keep it looking good

mart added a comment.Feb 15 2017, 4:19 PM

the idea was to stilòl have the badge show up to not make that option look "broken". tough also having the checkbox greyed out makes sense too

ah, found another reason why keeping the badge would be desiderable: laptops with removable battery (yeah, some of them are still out there :p) would make the option basically unconfigurable until you can attach a battery again to it.

mart updated this revision to Diff 11375.Feb 15 2017, 4:28 PM
  • e i18n for the placeholder
davidedmundson accepted this revision.Feb 15 2017, 5:20 PM
davidedmundson added a reviewer: davidedmundson.
This revision is now accepted and ready to land.Feb 15 2017, 5:20 PM
This revision was automatically updated to reflect the committed changes.