Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix slow UI #4833

Merged
merged 1 commit into from
Aug 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).


## [0.75.1] - 2024-08-02

### Fixed

- Fixed issue with Enter events causing unresponsive UI

## [0.75.0] - 2024-08-01

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

[0.75.1]: https://github.com/Textualize/textual/compare/v0.75.0...v0.75.1
[0.75.0]: https://github.com/Textualize/textual/compare/v0.74.0...v0.75.0
[0.74.0]: https://github.com/Textualize/textual/compare/v0.73.0...v0.74.0
[0.73.0]: https://github.com/Textualize/textual/compare/v0.72.0...v0.73.0
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "textual"
version = "0.75.0"
version = "0.75.1"
homepage = "https://github.com/Textualize/textual"
repository = "https://github.com/Textualize/textual"
documentation = "https://textual.textualize.io/"
Expand Down
6 changes: 4 additions & 2 deletions src/textual/scrollbar.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,10 +304,12 @@ def _on_hide(self, event: events.Hide) -> None:
self.grabbed = None

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

def _on_leave(self, event: events.Leave) -> None:
self.mouse_over = False
if event.node is self:
self.mouse_over = False

def action_scroll_down(self) -> None:
"""Scroll vertical scrollbars down, horizontal scrollbars right."""
Expand Down
8 changes: 5 additions & 3 deletions src/textual/widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -3848,11 +3848,13 @@ def _on_mount(self, event: events.Mount) -> None:
self.show_horizontal_scrollbar = True

def _on_leave(self, event: events.Leave) -> None:
self.mouse_hover = False
self.hover_style = Style()
if event.node is self:
self.mouse_hover = False
self.hover_style = Style()

def _on_enter(self, event: events.Enter) -> None:
self.mouse_hover = True
if event.node is self:
self.mouse_hover = True

def _on_focus(self, event: events.Focus) -> None:
self.has_focus = True
Expand Down
Loading