Skip to content

Commit

Permalink
move to compositor
Browse files Browse the repository at this point in the history
  • Loading branch information
willmcgugan committed Dec 6, 2023
1 parent 0d1ba16 commit 38adbfd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 5 additions & 1 deletion src/textual/_compositor.py
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,11 @@ def add_widget(
# Widgets with scrollbars (containers or scroll view) require additional processing
if widget.is_scrollable:
# The region that contains the content (container region minus scrollbars)
child_region = widget._get_scrollable_region(container_region)
child_region = (
container_region
if widget.loading
else widget._get_scrollable_region(container_region)
)

# The region covered by children relative to parent widget
total_region = child_region.reset_offset
Expand Down
3 changes: 0 additions & 3 deletions src/textual/widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -2747,9 +2747,6 @@ def _get_scrollable_region(self, region: Region) -> Region:
Returns:
The widget region minus scrollbars.
"""
if self.loading:
return region

show_vertical_scrollbar, show_horizontal_scrollbar = self.scrollbars_enabled

styles = self.styles
Expand Down

0 comments on commit 38adbfd

Please sign in to comment.