File tree Expand file tree Collapse file tree 4 files changed +9
-19
lines changed Expand file tree Collapse file tree 4 files changed +9
-19
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
2020- Added ` OptionList.set_options ` https://github.com/Textualize/textual/pull/6048
2121- Added ` TextArea.suggestion ` https://github.com/Textualize/textual/pull/6048
2222- Added ` TextArea.placeholder ` https://github.com/Textualize/textual/pull/6048
23- - Added ` Widget.get_line_filters `
23+ - Added ` Widget.get_line_filters ` and ` App.get_line_filters ` https://github.com/Textualize/textual/pull/6057
2424
2525### Changed
2626
Original file line number Diff line number Diff line change @@ -842,8 +842,12 @@ def __init__(
842842 )
843843 )
844844
845- @property
846- def _enabled_filters (self ) -> list [LineFilter ]:
845+ def get_line_filters (self ) -> Sequence [LineFilter ]:
846+ """Get currently enabled line filters.
847+
848+ Returns:
849+ A list of [LineFilter][textual.filters.LineFilter] instances.
850+ """
847851 return [filter for filter in self ._filters if filter .enabled ]
848852
849853 @property
Original file line number Diff line number Diff line change @@ -1144,20 +1144,6 @@ def _get_subtitle_style_information(
11441144 VisualStyle .from_rich_style (styles .border_subtitle_style ),
11451145 )
11461146
1147- # @property
1148- # def background_colors(self) -> tuple[Color, Color]:
1149- # """The background color and the color of the parent's background.
1150-
1151- # Returns:
1152- # `(<background color>, <color>)`
1153- # """
1154- # base_background = background = BLACK
1155- # for node in reversed(self.ancestors_with_self):
1156- # styles = node.styles
1157- # base_background = background
1158- # background += styles.background.tint(styles.background_tint)
1159- # return (base_background, background)
1160-
11611147 @property
11621148 def background_colors (self ) -> tuple [Color , Color ]:
11631149 """Background colors adjusted for opacity.
Original file line number Diff line number Diff line change @@ -679,9 +679,9 @@ def get_line_filters(self) -> Sequence[LineFilter]:
679679 """Get the line filters enabled for this widget.
680680
681681 Returns:
682- A sequence of LineFilter instances.
682+ A sequence of [ LineFilter][textual.filters.LineFilter] instances.
683683 """
684- return self .app ._enabled_filters
684+ return self .app .get_line_filters ()
685685
686686 def preflight_checks (self ) -> None :
687687 """Called in debug mode to do preflight checks.
You can’t perform that action at this time.
0 commit comments