From: Christian Heller Date: Sun, 20 Oct 2024 12:33:55 +0000 (+0200) Subject: Browser: Turn sidebar into Notebook of metadata and config boxes. X-Git-Url: https://plomlompom.com/repos/%7B%7Bprefix%7D%7D/add_structured?a=commitdiff_plain;h=db2ef279b63b7e03fed00ddf5c1fb3e1a04e1ff0;p=stable_plom Browser: Turn sidebar into Notebook of metadata and config boxes. --- diff --git a/browser.py b/browser.py index dd83eca..f39e6c4 100755 --- a/browser.py +++ b/browser.py @@ -253,11 +253,10 @@ class GalleryConfig(): per_row_box.append(self._btn_per_row) self.box = Gtk.Box(orientation=OR_V) - self.box.append(Gtk.Label(label='table config', use_markup=1)) - self.box.append(buttons_box) self.box.append(self.sorter_listing) self.box.append(dirs_box) self.box.append(per_row_box) + self.box.append(buttons_box) @classmethod def from_suggestion(cls, suggestion_fused): @@ -980,11 +979,7 @@ class MainWindow(Gtk.Window): editable=False) text_view.set_size_request(300, -1) self.metadata = text_view.get_buffer() - metadata_box = Gtk.Box(orientation=OR_V) - metadata_box.append( - Gtk.Label(label='metadata', use_markup=True)) - metadata_box.append(text_view) - return metadata_box + return text_view def init_key_control(): key_ctl = Gtk.EventControllerKey( @@ -1013,9 +1008,9 @@ class MainWindow(Gtk.Window): self.navbar = init_navbar() viewer.append(self.navbar) viewer.append(self.gallery.frame) - self.side_box = Gtk.Box(orientation=OR_V) - self.side_box.append(self.app.conf.box) - self.side_box.append(init_metadata_box()) + self.side_box = Gtk.Notebook.new() + self.side_box.append_page(init_metadata_box(), Gtk.Label(label='metadata')) + self.side_box.append_page(self.app.conf.box, Gtk.Label(label='config')) box_outer = Gtk.Box(orientation=OR_H) box_outer.append(self.side_box) box_outer.append(viewer)