Skip to content

Commit 319e8aa

Browse files
committed
fix slow UI
1 parent fcab581 commit 319e8aa

File tree

4 files changed

+18
-6
lines changed

4 files changed

+18
-6
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](http://keepachangelog.com/)
66
and this project adheres to [Semantic Versioning](http://semver.org/).
77

8+
9+
## [0.75.1] - 2024-08-02
10+
11+
### Fixed
12+
13+
- Fixed issue with Enter events causing unresponsive UI
14+
815
## [0.75.0] - 2024-08-01
916

1017
### Added
@@ -2250,6 +2257,7 @@ https://textual.textualize.io/blog/2022/11/08/version-040/#version-040
22502257
- New handler system for messages that doesn't require inheritance
22512258
- Improved traceback handling
22522259

2260+
[0.75.1]: https://github.com/Textualize/textual/compare/v0.75.0...v0.75.1
22532261
[0.75.0]: https://github.com/Textualize/textual/compare/v0.74.0...v0.75.0
22542262
[0.74.0]: https://github.com/Textualize/textual/compare/v0.73.0...v0.74.0
22552263
[0.73.0]: https://github.com/Textualize/textual/compare/v0.72.0...v0.73.0

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "textual"
3-
version = "0.75.0"
3+
version = "0.75.1"
44
homepage = "https://github.com/Textualize/textual"
55
repository = "https://github.com/Textualize/textual"
66
documentation = "https://textual.textualize.io/"

src/textual/scrollbar.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -304,10 +304,12 @@ def _on_hide(self, event: events.Hide) -> None:
304304
self.grabbed = None
305305

306306
def _on_enter(self, event: events.Enter) -> None:
307-
self.mouse_over = True
307+
if event.node is self:
308+
self.mouse_over = True
308309

309310
def _on_leave(self, event: events.Leave) -> None:
310-
self.mouse_over = False
311+
if event.node is self:
312+
self.mouse_over = False
311313

312314
def action_scroll_down(self) -> None:
313315
"""Scroll vertical scrollbars down, horizontal scrollbars right."""

src/textual/widget.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3848,11 +3848,13 @@ def _on_mount(self, event: events.Mount) -> None:
38483848
self.show_horizontal_scrollbar = True
38493849

38503850
def _on_leave(self, event: events.Leave) -> None:
3851-
self.mouse_hover = False
3852-
self.hover_style = Style()
3851+
if event.node is self:
3852+
self.mouse_hover = False
3853+
self.hover_style = Style()
38533854

38543855
def _on_enter(self, event: events.Enter) -> None:
3855-
self.mouse_hover = True
3856+
if event.node is self:
3857+
self.mouse_hover = True
38563858

38573859
def _on_focus(self, event: events.Focus) -> None:
38583860
self.has_focus = True

0 commit comments

Comments
 (0)