Set the battery percent as tooltip on the battery image

pull/145/head
Peter Hutterer 2019-07-16 11:04:46 +10:00
parent 958633e4ff
commit c7fe771082
1 changed files with 1 additions and 0 deletions

View File

@ -117,6 +117,7 @@ class DrawingPerspective(Gtk.Stack):
batt_icon_name = f'battery-{percent}{state}-symbolic'
_, isize = self.image_battery.get_icon_name()
self.image_battery.set_from_icon_name(batt_icon_name, isize)
self.image_battery.set_tooltip_text(f'{device.battery_percent}%')
def _on_sync_state(self, device, pspec):
if device.sync_state: