Skip to content
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
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,16 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

- Fixed `TextArea` cursor display on wrapped lines https://github.com/Textualize/textual/pull/6196
- Fixed `remove_children` not refreshing layout https://github.com/Textualize/textual/pull/6206
- Fixed flicker with :hover pseudo class https://github.com/Textualize/textual/pull/6214

### Added

- Added `grid_size` property to `GridLayout` https://github.com/Textualize/textual/pull/6210
- Exposed `NoSelection` and `BLANK` via `textual.widgets.select` https://github.com/Textualize/textual/pull/6214

### Changed

- Change highlight style of Select to only highlight the border, not the label https://github.com/Textualize/textual/pull/6214

## [6.5.0] - 2025-10-31

Expand Down
12 changes: 9 additions & 3 deletions src/textual/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -3037,11 +3037,17 @@ def _set_mouse_over(
widget.post_message(events.Enter(widget))
finally:
self.mouse_over = widget
if self.hover_over is not None:
self.hover_over.mouse_hover = False

current_hover_over = self.hover_over
if current_hover_over is not None:
current_hover_over.mouse_hover = False

if hover_widget is not None:
hover_widget.mouse_hover = True

if hover_widget._has_hover_style:
hover_widget._update_styles()
if current_hover_over is not None and current_hover_over._has_hover_style:
current_hover_over._update_styles()
self.hover_over = hover_widget

def _update_mouse_over(self, screen: Screen) -> None:
Expand Down
5 changes: 0 additions & 5 deletions src/textual/widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -3963,11 +3963,6 @@ def post_render(

return renderable

def watch_mouse_hover(self, _mouse_over: bool) -> None:
"""Update from CSS if mouse over state changes."""
if self._has_hover_style:
self._update_styles()

def watch_has_focus(self, _has_focus: bool) -> None:
"""Update from CSS if has focus state changes."""
self._update_styles()
Expand Down
13 changes: 10 additions & 3 deletions src/textual/widgets/_toggle_button.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,15 @@ class ToggleButton(Static, can_focus=True):
&.-textual-compact {
border: none !important;
padding: 0;
&:focus {
border: tall $border;
background-tint: $foreground 5%;
& > .toggle--label {
color: $block-cursor-foreground;
background: $block-cursor-background;
text-style: $block-cursor-text-style;
}
}
}

& > .toggle--button {
Expand All @@ -80,9 +89,7 @@ class ToggleButton(Static, can_focus=True):
border: tall $border;
background-tint: $foreground 5%;
& > .toggle--label {
color: $block-cursor-foreground;
background: $block-cursor-background;
text-style: $block-cursor-text-style;
color: $block-cursor-foreground;
}
}
&:blur:hover {
Expand Down
9 changes: 7 additions & 2 deletions src/textual/widgets/select.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
from textual.widgets._select import EmptySelectError, InvalidSelectValueError
from textual.widgets._select import (
BLANK,
EmptySelectError,
InvalidSelectValueError,
NoSelection,
)

__all__ = ["EmptySelectError", "InvalidSelectValueError"]
__all__ = ["EmptySelectError", "InvalidSelectValueError", "NoSelection", "BLANK"]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading