Skip to content

Commit

Permalink
cs_power.py: Align the new peripheral battery status at the end of th…
Browse files Browse the repository at this point in the history
…e row, and do

the same for the charge status of battery devices for consistency.
  • Loading branch information
mtwebster committed Aug 9, 2018
1 parent ef1cf5d commit e02954f
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -491,10 +491,12 @@ def create_battery_row(self, device_id, icon_name, desc, percentage, battery_lev
else:
status_box = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL)
status_icon = Gtk.Image.new_from_icon_name(self.bat_level_to_icon(battery_level), Gtk.IconSize.BUTTON)
status_icon.set_size_request(30, -1)

status_box.pack_start(status_icon, False, False, 15)

status_label = Gtk.Label(self.bat_level_to_label(battery_level))
status_box.pack_start(status_label, False, False, 0)
status_box.pack_end(status_label, False, False, 0)
hbox.pack_start(status_box, True, True, 0)

vbox.pack_start(hbox, False, False, 0)
Expand All @@ -503,6 +505,7 @@ def create_battery_row(self, device_id, icon_name, desc, percentage, battery_lev
label = Gtk.Label()
label.set_markup(details)
label.get_style_context().add_class("dim-label")
label.set_halign(Gtk.Align.END)
vbox.pack_end(label, False, False, 0)

widget.pack_start(vbox, True, True, 0)
Expand Down

0 comments on commit e02954f

Please sign in to comment.