mirror of
https://github.com/aclist/dztui.git
synced 2026-08-26 09:47:36 +02:00
fix: toggle button sensitivity on map
This commit is contained in:
parent
4f8d397bbc
commit
343e402403
@ -61,6 +61,15 @@ class ModSelectionPanel(Gtk.Box):
|
||||
for el in header, self.main_panel, self.stale_panel:
|
||||
self.pack_start(el, NO_EXPAND, FILL, NO_PADDING)
|
||||
|
||||
self.connect("map", self._reinit_button)
|
||||
|
||||
def _reinit_button(self, s) -> None:
|
||||
for child in self.stale_panel.get_children():
|
||||
if child.enum == ModButton.UNHIGHLIGHT_STALE:
|
||||
child.set_sensitive(False)
|
||||
else:
|
||||
child.set_sensitive(True)
|
||||
|
||||
def _on_mods_highlighted(self, emitter: "Emitter") -> None:
|
||||
self.swap_sensitive(True)
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user