def __init__(self, app, name, use_icon, widget):
self.pressed = Gtk.Label()
ControllerWidget.__init__(self, app, name, use_icon, widget)
grid = Gtk.Grid()
self.label.set_property("vexpand", True)
self.label.set_property("hexpand", True)
self.label.set_xalign(0.0); self.label.set_yalign(0.5)
self.pressed.set_property("hexpand", True)
self.pressed.set_xalign(0.0); self.pressed.set_yalign(1.0)
if self.icon:
self.icon.set_margin_right(5)
grid.attach(self.icon, 1, 1, 1, 2)
grid.attach(self.label, 2, 1, 1, 1)
grid.attach(self.pressed, 2, 2, 1, 1)
self.over_icon = False
self.widget.add(grid)
self.widget.show_all()
评论列表
文章目录