Fix allow_focus

This commit is contained in:
Will McGugan
2025-04-11 16:17:37 +01:00
parent 5fc41eb58b
commit 13be373949
5 changed files with 86 additions and 2 deletions

View File

@@ -303,7 +303,7 @@ class ChangingThemeApp(App[None]):
widget.__class__.__name__,
(
partial(self.set_focus, widget)
if widget.can_focus
if widget.allow_focus()
else lambda: None
),
f"Focus on {widget.__class__.__name__}",