Skip to content

Commit e73411b

Browse files
committed
changelog
1 parent 369feef commit e73411b

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,16 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
1313
- Fixed height of auto container which contains auto height children https://github.com/Textualize/textual/pull/5552
1414
- Fixed `Content.from_markup` not stripping control codes https://github.com/Textualize/textual/pull/5557
1515
- Fixed `delta_x` and `delta_y` in mouse events when smooth scrolling is enabled https://github.com/Textualize/textual/pull/5556
16+
- Fixed detection of smooth scrolling
1617

1718
### Added
1819

1920
- Added `pointer_x`, `pointer_y`, `pointer_screen_x`, and `pointer_screen_y` attributes to mouse events https://github.com/Textualize/textual/pull/5556
2021

22+
### Changed
23+
24+
- Animating the scrollbar while dragging is disabled if smooth scrolling is available
25+
2126
## [2.0.4] - 2025-02-17
2227

2328
### Fixed

src/textual/app.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -795,7 +795,7 @@ def __init__(
795795
self._clipboard: str = ""
796796
"""Contents of local clipboard."""
797797

798-
self.supports_smooth_scrolling: bool = True
798+
self.supports_smooth_scrolling: bool = False
799799
"""Does the terminal support smooth scrolling?"""
800800

801801
if self.ENABLE_COMMAND_PALETTE:
@@ -4654,7 +4654,7 @@ def _on_terminal_supports_in_band_window_resize(
46544654
"""There isn't much we can do with this information currently, so
46554655
we will just log it.
46564656
"""
4657-
self.supports_smooth_scrolling = True
4657+
self.supports_smooth_scrolling = message.enabled
46584658
self.log.debug(message)
46594659

46604660
def _on_idle(self) -> None:

src/textual/scrollbar.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,9 @@ async def _on_mouse_move(self, event: events.MouseMove) -> None:
379379
(event._screen_x - self.grabbed.x)
380380
* (virtual_size / self.window_size)
381381
)
382-
self.post_message(ScrollTo(x=x, y=y))
382+
self.post_message(
383+
ScrollTo(x=x, y=y, animate=not self.app.supports_smooth_scrolling)
384+
)
383385
event.stop()
384386

385387
async def _on_click(self, event: events.Click) -> None:

0 commit comments

Comments
 (0)