added headerbar buttons

This commit is contained in:
Alperen İsa 2021-09-03 15:09:59 +03:00 committed by GitHub
parent fe8d6a83c5
commit aad6870006
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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)