mirror of
https://github.com/1j01/textual-paint.git
synced 2024-12-11 08:33:02 +03:00
Revert "Remove update_styles hack, seemingly not needed anymore"
This reverts commit 42ca86f7eb
.
It's needed again after the last commit...
I did override `focus`, so it's not that surprising.
But I definitely want to figure this out.
This commit is contained in:
parent
eba3043d09
commit
12c494983e
@ -140,6 +140,10 @@ class Window(Container):
|
||||
self.mount(self.content)
|
||||
# Set focus. (In the future, some windows will not want default focus...)
|
||||
self.focus()
|
||||
# Fix for incorrect layout that would only resolve on mouse over
|
||||
# (I peaked into mouse over handling and it calls update_styles.)
|
||||
# This can still briefly show the incorrect layout, since it relies on a timer.
|
||||
self.set_timer(0.01, lambda: self.app.update_styles(self))
|
||||
|
||||
def on_focus(self, event: events.Focus) -> None:
|
||||
"""Called when the window is focused."""
|
||||
|
Loading…
Reference in New Issue
Block a user