mirror of
https://github.com/Afacanc38/gtk-examples-python.git
synced 2024-11-17 03:55:05 +03:00
added headerbar buttons
This commit is contained in:
parent
fe8d6a83c5
commit
aad6870006
1 changed files with 12 additions and 0 deletions
|
@ -1,3 +1,5 @@
|
||||||
|
selamun = "aleyküm"
|
||||||
|
|
||||||
import gi, os
|
import gi, os
|
||||||
gi.require_version("Gtk", "3.0")
|
gi.require_version("Gtk", "3.0")
|
||||||
gi.require_version("Handy", "1")
|
gi.require_version("Handy", "1")
|
||||||
|
@ -30,6 +32,16 @@ class MyWindow(Handy.Window):
|
||||||
self.lbl.set_justify(Gtk.Justification.CENTER)
|
self.lbl.set_justify(Gtk.Justification.CENTER)
|
||||||
self.winbox.pack_start(self.lbl, True, True, 0)
|
self.winbox.pack_start(self.lbl, True, True, 0)
|
||||||
|
|
||||||
|
# Headerbar button 1
|
||||||
|
self.button = Gtk.Button()
|
||||||
|
self.button = Gtk.Button.new_from_icon_name("pan-start-symbolic", Gtk.IconSize.MENU)
|
||||||
|
self.hb.pack_start(self.button)
|
||||||
|
|
||||||
|
# Headerbar button 2
|
||||||
|
self.button2 = Gtk.Button()
|
||||||
|
self.button2 = Gtk.Button.new_from_icon_name("pan-end-symbolic", Gtk.IconSize.MENU)
|
||||||
|
self.hb.pack_start(self.button2)
|
||||||
|
|
||||||
|
|
||||||
win = MyWindow()
|
win = MyWindow()
|
||||||
win.connect("destroy", Gtk.main_quit)
|
win.connect("destroy", Gtk.main_quit)
|
||||||
|
|
Loading…
Reference in a new issue