File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -845,11 +845,6 @@ def _set_theme(self, theme: str) -> None:
845845 if background :
846846 self .styles .background = Color .from_rich_color (background )
847847
848- def apply_theme () -> None :
849- self ._theme .apply_css (self )
850-
851- self .call_later (apply_theme )
852-
853848 @property
854849 def available_themes (self ) -> set [str ]:
855850 """A list of the names of the themes available to the `TextArea`.
@@ -1121,6 +1116,12 @@ def get_line(self, line_index: int) -> Text:
11211116 line_string = self .document .get_line (line_index )
11221117 return Text (line_string , end = "" , no_wrap = True )
11231118
1119+ def render_lines (self , crop : Region ) -> list [Strip ]:
1120+ theme = self ._theme
1121+ if theme :
1122+ theme .apply_css (self )
1123+ return super ().render_lines (crop )
1124+
11241125 def render_line (self , y : int ) -> Strip :
11251126 """Render a single line of the TextArea. Called by Textual.
11261127
You can’t perform that action at this time.
0 commit comments