def make_button(icon, tooltip, toggle):
if toggle: button = Gtk.ToggleButton()
else: button = Gtk.Button()
button.set_always_show_image(True)
button.set_image(icon)
button.set_border_width(3)
button.set_relief(Gtk.ReliefStyle.NONE)
button.set_can_focus(False)
if tooltip: button.set_tooltip_text(tooltip)
return button
评论列表
文章目录