def make_image_row(text, img_path):
box = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL)
label = Gtk.Label()
label.set_text(text)
icon = Gtk.Image()
icon.set_from_resource(img_path)
label.set_margin_left(12)
label.set_margin_right(12)
box.pack_start(icon, False, False, 0)
box.pack_start(label, False, False, 0)
row = Gtk.ListBoxRow()
row.add(box)
return row
评论列表
文章目录