power: visual updates

This commit is contained in:
Jordan 2020-12-20 23:51:41 -05:00
parent 37c043b3f9
commit 9016b67c6f
2 changed files with 4 additions and 6 deletions

View File

@ -38,14 +38,16 @@ class PowerPanel(ScreenPanel):
self._screen.add_subscription(panel_name)
def add_device(self, device):
frame = Gtk.Frame()
frame.set_property("shadow-type",Gtk.ShadowType.NONE)
frame.get_style_context().add_class("frame-item")
name = Gtk.Label()
name.set_markup("<big><b>%s</b></big>" % (device))
name.set_hexpand(True)
name.set_vexpand(True)
name.set_halign(Gtk.Align.START)
name.set_valign(Gtk.Align.CENTER)
name.set_line_wrap(True)
name.set_line_wrap_mode(Pango.WrapMode.WORD_CHAR)
@ -60,13 +62,8 @@ class PowerPanel(ScreenPanel):
labels.add(name)
dev = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL, spacing=5)
dev.set_margin_top(10)
dev.set_margin_end(15)
dev.set_margin_start(15)
dev.set_margin_bottom(10)
dev.set_hexpand(True)
dev.set_vexpand(False)
dev.add(labels)
dev.add(switch)
frame.add(dev)

View File

@ -143,6 +143,7 @@ trough {
}
.frame-item {
min-height: 4.5em;
padding: .1em .75em;
}