def get_image_with_text(text, image=None):
hbox = Gtk.HBox()
if image:
image = load_image(os.path.join(comun.IMAGESDIR, image))
# image = Gtk.Image.new_from_file(image)
image.set_alignment(1, 0.5)
hbox.pack_start(image, True, True, 0)
label = Gtk.Label.new(text)
label.set_alignment(0, 0.5)
hbox.pack_start(label, True, True, 0)
return hbox
评论列表
文章目录