From a71088ea828ddba0c133ffd2748d290cadb0eff1 Mon Sep 17 00:00:00 2001 From: Will McGugan Date: Wed, 21 Aug 2024 15:21:02 +0100 Subject: [PATCH] simplify --- src/textual/widget.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/textual/widget.py b/src/textual/widget.py index 43c543424e..868f39b6f2 100644 --- a/src/textual/widget.py +++ b/src/textual/widget.py @@ -2647,7 +2647,7 @@ def scroll_page_up( level: Minimum level required for the animation to take place (inclusive). """ self.scroll_to( - y=self.scroll_y - self.scrollable_content_region.size.height, + y=self.scroll_y - self.scrollable_content_region.height, animate=animate, speed=speed, duration=duration, @@ -2680,7 +2680,7 @@ def scroll_page_down( level: Minimum level required for the animation to take place (inclusive). """ self.scroll_to( - y=self.scroll_y + self.scrollable_content_region.size.height, + y=self.scroll_y + self.scrollable_content_region.height, animate=animate, speed=speed, duration=duration, @@ -2715,7 +2715,7 @@ def scroll_page_left( if speed is None and duration is None: duration = 0.3 self.scroll_to( - x=self.scroll_x - self.scrollable_content_region.size.width, + x=self.scroll_x - self.scrollable_content_region.width, animate=animate, speed=speed, duration=duration, @@ -2750,7 +2750,7 @@ def scroll_page_right( if speed is None and duration is None: duration = 0.3 self.scroll_to( - x=self.scroll_x + self.scrollable_content_region.size.width, + x=self.scroll_x + self.scrollable_content_region.width, animate=animate, speed=speed, duration=duration,