Skip to content

Commit

Permalink
docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
willmcgugan committed May 20, 2024
1 parent 87ab5a7 commit ea6135f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/textual/widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand Down

0 comments on commit ea6135f

Please sign in to comment.