From 9a44f534e70258cbf6a0a9bb7a4d18a4a1a0a961 Mon Sep 17 00:00:00 2001 From: gryf Date: Mon, 2 Oct 2023 15:11:56 +0200 Subject: [PATCH] Added search entry --- gtkpass.py | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/gtkpass.py b/gtkpass.py index 73e533a..de2d71a 100755 --- a/gtkpass.py +++ b/gtkpass.py @@ -18,8 +18,34 @@ class GTKPass(Gtk.Window): self.passs = PassStore() self.passs.gather_pass_tree() + self._border = 5 self.make_ui() + def make_ui(self): + self.set_resizable(True) + self.set_border_width(self._border) + + # main box + mainbox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, + spacing=self._border) + mainbox.set_homogeneous(False) + self.add(mainbox) + + # pane + pane = Gtk.Paned(orientation=Gtk.Orientation.HORIZONTAL) + mainbox.pack_start(child=pane, expand=True, fill=True, padding=0) + + # box for search entry + lbox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, + spacing=self._border) + lbox.set_homogeneous(False) + pane.pack1(child=lbox, resize=True, shrink=False) + + # search box + self.search = Gtk.SearchEntry() + self.search.set_placeholder_text("Search password") + lbox.pack_start(child=self.search, expand=False, fill=False, padding=0) + self.show_all()