From eadb27653c90a4430ec9378b5af6050bfa5eaa7a Mon Sep 17 00:00:00 2001 From: Christian Heller Date: Sat, 26 Oct 2024 15:54:45 +0200 Subject: [PATCH] Browser: Also label attribute name for primary sorter in by_1st view. --- browser.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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 -- 2.30.2