From: Christian Heller Date: Sat, 26 Oct 2024 13:54:45 +0000 (+0200) Subject: Browser: Also label attribute name for primary sorter in by_1st view. X-Git-Url: https://plomlompom.com/repos/%7B%7Bdb.prefix%7D%7D/%7B%7B%20web_path%20%7D%7D/decks/foo.html?a=commitdiff_plain;h=eadb27653c90a4430ec9378b5af6050bfa5eaa7a;p=stable_plom Browser: Also label attribute name for primary sorter in by_1st view. --- diff --git a/browser.py b/browser.py index af44e7f..677aca1 100755 --- a/browser.py +++ b/browser.py @@ -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'{attr_name}: {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