From ea6135f2c0476e3c8c0cbd80361de356c03a717c Mon Sep 17 00:00:00 2001 From: Will McGugan Date: Mon, 20 May 2024 18:57:56 +0100 Subject: [PATCH] docstrings --- src/textual/widget.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/textual/widget.py b/src/textual/widget.py index 3e207e09b1..e1ae3d1ae0 100644 --- a/src/textual/widget.py +++ b/src/textual/widget.py @@ -525,8 +525,8 @@ def is_anchored(self) -> bool: return self._parent is not None and self._parent is self def anchor(self, *, animate: bool = False) -> None: - """Anchor the widget to the bottom of the screen, which ensure that - it will be scrolled in to view if its size or the size of its container changes. + """Anchor the widget, which scrolls it into view (like [scroll_visible][textual.widget.Widget.scroll_visible]), + but also keeps it in view if the widget's size changes, or the size of its container changes. !!! note @@ -541,7 +541,7 @@ def anchor(self, *, animate: bool = False) -> None: self.check_idle() def clear_anchor(self) -> None: - """If this widget is anchored, clear the anchor state.""" + """Stop anchoring this widget (a no-op if this widget is not anchored).""" if ( self._parent is not None and isinstance(self._parent, Widget)