mirror of
https://github.com/aclist/dztui.git
synced 2026-10-26 04:32:39 +01:00
fix: toggle button sensitivity on map
This commit is contained in:
1 parent
4f8d397bbc
commit
343e402403
1 file changed
+9
@@ -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)
|
||||
|
||||
|
||||
Reference in new issue
Block a user