Skip to content

Commit 5828807

Browse files
authored
Merge pull request #6238 from Textualize/content-style-optimize
optimizations for Content and Style
2 parents e66c098 + a4de208 commit 5828807

File tree

6 files changed

+337
-23
lines changed

6 files changed

+337
-23
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
1010
### Added
1111

1212
- Added `GridLayout.max_column_width` https://github.com/Textualize/textual/pull/6228
13+
- Added `Content.fold` https://github.com/Textualize/textual/pull/6238
14+
- Added `strip_control_codes` to Content constructors https://github.com/Textualize/textual/pull/6238
15+
1316

1417
### Changed
1518

src/textual/_compositor.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -695,9 +695,9 @@ def add_widget(
695695
widget.container_size.height
696696
- widget.scrollbar_size_horizontal
697697
)
698-
widget.set_reactive(Widget.scroll_y, new_scroll_y)
699-
widget.set_reactive(Widget.scroll_target_y, new_scroll_y)
700-
widget.vertical_scrollbar._reactive_position = new_scroll_y
698+
widget.scroll_y = new_scroll_y
699+
widget.scroll_target_y = new_scroll_y
700+
widget.vertical_scrollbar.position = new_scroll_y
701701

702702
if visible:
703703
# Add any scrollbars

0 commit comments

Comments
 (0)