From aad6870006521a56b87ba6dff942445c7ad34727 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alperen=20=C4=B0sa?= <66299502+Afacanc38@users.noreply.github.com> Date: Fri, 3 Sep 2021 15:09:59 +0300 Subject: [PATCH] added headerbar buttons --- handy/2-headerbar.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/handy/2-headerbar.py b/handy/2-headerbar.py index 4d998e9..19fe301 100644 --- a/handy/2-headerbar.py +++ b/handy/2-headerbar.py @@ -1,3 +1,5 @@ +selamun = "aleyküm" + import gi, os gi.require_version("Gtk", "3.0") gi.require_version("Handy", "1") @@ -30,6 +32,16 @@ class MyWindow(Handy.Window): self.lbl.set_justify(Gtk.Justification.CENTER) 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.connect("destroy", Gtk.main_quit)