Fix the battery icon name
We need to crop to the nearest 20, not just divide by it.
This commit is contained in:
parent
2df9f55119
commit
d07835b15c
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue