home · contact · privacy
Browser: Turn sidebar into Notebook of metadata and config boxes.
authorChristian Heller <c.heller@plomlompom.de>
Sun, 20 Oct 2024 12:33:55 +0000 (14:33 +0200)
committerChristian Heller <c.heller@plomlompom.de>
Sun, 20 Oct 2024 12:33:55 +0000 (14:33 +0200)
browser.py

index dd83eca0e28c2667ccdb0ee99f5ba07cc269a097..f39e6c4490eddd447569bfc57270f2361bf67b3a 100755 (executable)
@@ -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='<b>table config</b>', 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='<b>metadata</b>', 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)