Fix the battery icon name

We need to crop to the nearest 20, not just divide by it.
pull/145/head
Peter Hutterer 2019-07-11 16:09:42 +10:00
parent 2df9f55119
commit d07835b15c
1 changed files with 1 additions and 1 deletions

View File

@ -63,7 +63,7 @@ class DrawingPerspective(Gtk.Stack):
state = '-charging'
else:
state = ''
percent = f'{int(device.battery_percent/20):03d}'
percent = f'{int(device.battery_percent/20) * 20:03d}'
batt_icon_name = f'battery-{percent}{state}'
_, isize = self.image_battery.get_icon_name()
self.image_battery.set_from_icon_name(batt_icon_name, isize)