def add_heading(self, text):
def set_alignment(x, y):
for c in self.get_children()[0].get_children():
super(Gtk.Label, c).set_alignment(x, y)
vbox = Gtk.VBox(False, 0)
vbox.set_alignment = set_alignment
b = Gtk.Label()
b.set_markup(u"%s" % text)
b.set_alignment(0.0, 0.5)
vbox.pack_start(b, False, False, 0)
self.get_children()[0].reparent(vbox)
self.add(vbox)
评论列表
文章目录