Skip to content

Commit

Permalink
auto expand
Browse files Browse the repository at this point in the history
  • Loading branch information
willmcgugan committed Aug 5, 2024
1 parent a4265f6 commit 2fc524a
Show file tree
Hide file tree
Showing 2 changed files with 100 additions and 100 deletions.
12 changes: 6 additions & 6 deletions src/textual/widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -1236,9 +1236,9 @@ def _get_box_model(
content_width = Fraction(
self.get_content_width(content_container - margin.totals, viewport)
)
if styles.overflow_x == "auto" and (
styles.scrollbar_gutter == "stable" or self.show_vertical_scrollbar
):
if (
styles.overflow_x == "auto" and styles.scrollbar_gutter == "stable"
) or self.show_vertical_scrollbar:
content_width += styles.scrollbar_size_vertical
if (
content_width < content_container.width
Expand Down Expand Up @@ -1288,9 +1288,9 @@ def _get_box_model(
content_height = Fraction(
self.get_content_height(content_container, viewport, int(content_width))
)
if styles.overflow_y == "auto" and (
styles.scrollbar_gutter == "stable" or self.show_horizontal_scrollbar
):
if (
styles.overflow_y == "auto" and styles.scrollbar_gutter == "stable"
) or self.show_horizontal_scrollbar:
content_height += styles.scrollbar_size_horizontal
if (
content_height < content_container.height
Expand Down
Loading

0 comments on commit 2fc524a

Please sign in to comment.