mirror of
https://github.com/aclist/dztui.git
synced 2026-08-27 18:27:07 +02:00
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.
This commit is contained in:
parent
9d3aa8d9f5
commit
83a7996189
@ -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
|
||||
|
||||
@ -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)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user