From 83a79961891b471690a96fc30bb6b2551c01c5b5 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Sat, 6 Jun 2026 17:39:49 +0900 Subject: [PATCH] The filter panel previously did not pack filter labels homogeneously, so the width of the "Unofficial" label was being manually constrained by abbreviating it. Labels auto ellipsize and adjust now, so the full name is used. The filter file check is also allowed to fail if the user's filter preferences file contains old key names. --- dzgui/util/strings.py | 2 +- dzgui/views/components/filter_panel.py | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/dzgui/util/strings.py b/dzgui/util/strings.py index bc6904c..dad40fa 100644 --- a/dzgui/util/strings.py +++ b/dzgui/util/strings.py @@ -181,7 +181,7 @@ filter_lowpop = "Low pop" filter_nonascii = "Non-ASCII" filter_duplicate = "Duplicate" filter_official = "Official" -filter_unofficial = "Unoffic." +filter_unofficial = "Unofficial" filter_modded = "Modded" # maps diff --git a/dzgui/views/components/filter_panel.py b/dzgui/views/components/filter_panel.py index 26f4974..7d7310e 100644 --- a/dzgui/views/components/filter_panel.py +++ b/dzgui/views/components/filter_panel.py @@ -333,6 +333,9 @@ class FilterPanel(Gtk.Box): self.emitter.emit("map_selection_changed", name) def set_filters(self, filters: dict[str, bool]) -> None: - for check in self.button_grid.checks: - label = check.get_label() - check.set_active(filters[label]) + try: + for check in self.button_grid.checks: + label = check.get_label() + check.set_active(filters[label]) + except Exception as e: + logger.warning(e)