From 5b18de6d038d6f9783ba7710dea3409f3117c8a1 Mon Sep 17 00:00:00 2001 From: TomJGooding <101601846+TomJGooding@users.noreply.github.com> Date: Tue, 9 Jul 2024 21:42:06 +0100 Subject: [PATCH] feat(widget): add scrollable_size property Closes #2175. --- src/textual/widget.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/textual/widget.py b/src/textual/widget.py index 3c4631c303..d276e90ea3 100644 --- a/src/textual/widget.py +++ b/src/textual/widget.py @@ -1635,6 +1635,15 @@ def size(self) -> Size: """ return self.content_region.size + @property + def scrollable_size(self) -> Size: + """The size of the scrollable content. + + Returns: + Scrollable content size. + """ + return self.scrollable_content_region.size + @property def outer_size(self) -> Size: """The size of the widget (including padding and border).