Skip to content

Commit

Permalink
simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
willmcgugan committed Aug 21, 2024
1 parent 7f8f912 commit a71088e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/textual/widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit a71088e

Please sign in to comment.