Skip to content

Commit

Permalink
Revert "Potential fix for #1616."
Browse files Browse the repository at this point in the history
This reverts commit c74b81a.
  • Loading branch information
rodrigogiraoserrao committed Jan 23, 2023
1 parent 60faf9f commit 33724e4
Showing 1 changed file with 4 additions and 14 deletions.
18 changes: 4 additions & 14 deletions src/textual/widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -1959,23 +1959,13 @@ def _get_scrollable_region(self, region: Region) -> Region:
"""
show_vertical_scrollbar, show_horizontal_scrollbar = self.scrollbars_enabled

styles = self.styles
scrollbar_size_horizontal = styles.scrollbar_size_horizontal
scrollbar_size_vertical = styles.scrollbar_size_vertical
scrollbar_size_horizontal = self.styles.scrollbar_size_horizontal
scrollbar_size_vertical = self.styles.scrollbar_size_vertical

if styles.scrollbar_gutter == "stable":
if self.styles.scrollbar_gutter == "stable":
# Let's _always_ reserve some space, whether the scrollbar is actually displayed or not:
show_vertical_scrollbar = True
scrollbar_size_vertical = styles.scrollbar_size_vertical

overflow_x = styles.overflow_x
show_horizontal_scrollbar = (
show_horizontal_scrollbar or overflow_x == "scroll"
) and overflow_x != "hidden"
overflow_y = styles.overflow_y
show_vertical_scrollbar = (
show_vertical_scrollbar or overflow_y == "scroll"
) and overflow_y != "hidden"
scrollbar_size_vertical = self.styles.scrollbar_size_vertical

if show_horizontal_scrollbar and show_vertical_scrollbar:
(region, _, _, _) = region.split(
Expand Down

0 comments on commit 33724e4

Please sign in to comment.