This looks like a Desktop variation of bug #1388235. The solution there
was to provide extra icons for 10%, 30%, 50%, 70%, and 90% so that we
could improve our accuracy when rounding to the closest icon, and also
to special case the rounding between [20-30%) to avoid hitting the red-
at-20% icons from not just our own icon sets but others eg Humanity.

I'm seeing the same behavior on my Xenial box when I set the battery to
28%.  The icon list sent by indicator-power is correct:

> {"battery-030", "gpm-battery-030", "battery-020", "gpm-battery-020",
"battery-low-symbolic", "battery-low"}

So the rounding rules described in bullet point #2 of
https://bugs.launchpad.net/ubuntu/+source/indicator-
power/+bug/1388235/comments/5 are working correctly and things look
great on devices with suru icons. The problem for the Desktop is that
bullet point #3 is incorrect:

> indicator-power keep providing the current icon names as fallbacks so
that this fix doesn't break compatibility with other icon themes

Because ?keeping the current icon names as fallbacks" means the problem
still persists in other icon sets. We should tweak the special case rule
for [20-30%) s.t. the fallback icon is *040* instead of *020*, e.g.:

-  {"battery-030", "gpm-battery-030", "battery-020", "gpm-battery-020", 
"battery-low-symbolic", "battery-low"}
+ {"battery-030", "gpm-battery-030", "battery-040", "gpm-battery-040", 
"battery-low-symbolic", "battery-low"}


** Changed in: indicator-power (Ubuntu)
       Status: Confirmed => Triaged

** Changed in: indicator-power (Ubuntu Xenial)
       Status: Confirmed => Triaged

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1559731

Title:
  Battery indicator turns red at 30%

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/indicator-power/+bug/1559731/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to