mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
better fix
This commit is contained in:
@@ -1419,7 +1419,7 @@ class App(Generic[ReturnType], DOMNode):
|
||||
raise InvalidThemeError(message)
|
||||
return theme_name
|
||||
|
||||
async def _watch_theme(self, theme_name: str) -> None:
|
||||
def _watch_theme(self, theme_name: str) -> None:
|
||||
"""Apply a theme to the application.
|
||||
|
||||
This method is called when the theme reactive attribute is set.
|
||||
@@ -3657,8 +3657,9 @@ class App(Generic[ReturnType], DOMNode):
|
||||
stylesheet.reparse()
|
||||
stylesheet.update(self.app, animate=animate)
|
||||
try:
|
||||
self.screen._refresh_layout(self.size)
|
||||
self.screen._css_update_count = self._css_update_count
|
||||
if self.screen.is_mounted:
|
||||
self.screen._refresh_layout(self.size)
|
||||
self.screen._css_update_count = self._css_update_count
|
||||
except ScreenError:
|
||||
pass
|
||||
# The other screens in the stack will need to know about some style
|
||||
|
||||
Reference in New Issue
Block a user