home · contact · privacy
Browser: Also label attribute name for primary sorter in by_1st view.
authorChristian Heller <c.heller@plomlompom.de>
Sat, 26 Oct 2024 13:54:45 +0000 (15:54 +0200)
committerChristian Heller <c.heller@plomlompom.de>
Sat, 26 Oct 2024 13:54:45 +0000 (15:54 +0200)
browser.py

index af44e7f3bd8b912df211efb373129fc2d8fa47ab..677aca1f1a8edb6dc070669961812342db07e058 100755 (executable)
@@ -924,10 +924,12 @@ class Gallery:
         if self._by_1st:
             self._col_headers_grid = Gtk.Grid()
             self._col_headers_frame.put(self._col_headers_grid, 0, 0)
-            attr_values = self.items_attrs[self._sort_order[0].name]['incl']
+            attr_name = self._sort_order[0].name
+            attr_values = self.items_attrs[attr_name]['incl']
             for i, val in enumerate(attr_values):
-                label = Gtk.Label(label=str(val),
+                label = Gtk.Label(label=f'<b>{attr_name}</b>: {val}',
                                   ellipsize=Pango.EllipsizeMode.MIDDLE)
+                label.set_use_markup(True)
                 label.set_size_request(slot_size, -1)
                 self._col_headers_grid.attach(label, i, 0, 1, 1)
         slot_size_sans_margin = slot_size - self._slot_margin