@@ -428,7 +428,7 @@ def __init__(
428428 has_focus : Reactive [bool ] = Reactive (False , repaint = False )
429429 """Does this widget have focus? Read only."""
430430
431- mouse_over : Reactive [bool ] = Reactive (False , repaint = False )
431+ mouse_hover : Reactive [bool ] = Reactive (False , repaint = False )
432432 """Is the mouse over this widget? Read only."""
433433
434434 scroll_x : Reactive [float ] = Reactive (0.0 , repaint = False , layout = False )
@@ -3172,7 +3172,7 @@ def get_pseudo_classes(self) -> Iterable[str]:
31723172 Returns:
31733173 Names of the pseudo classes.
31743174 """
3175- if self .mouse_over :
3175+ if self .mouse_hover :
31763176 yield "hover"
31773177 if self .has_focus :
31783178 yield "focus"
@@ -3220,7 +3220,7 @@ def get_pseudo_class_state(self) -> PseudoClasses:
32203220
32213221 pseudo_classes = PseudoClasses (
32223222 enabled = not disabled ,
3223- hover = self .mouse_over ,
3223+ hover = self .mouse_hover ,
32243224 focus = self .has_focus ,
32253225 )
32263226 return pseudo_classes
@@ -3264,7 +3264,7 @@ def post_render(self, renderable: RenderableType) -> ConsoleRenderable:
32643264
32653265 return renderable
32663266
3267- def watch_mouse_over (self , value : bool ) -> None :
3267+ def watch_mouse_hover (self , value : bool ) -> None :
32683268 """Update from CSS if mouse over state changes."""
32693269 if self ._has_hover_style :
32703270 self ._update_styles ()
@@ -3277,7 +3277,7 @@ def watch_disabled(self, disabled: bool) -> None:
32773277 """Update the styles of the widget and its children when disabled is toggled."""
32783278 from .app import ScreenStackError
32793279
3280- if disabled and self .mouse_over and self .app .mouse_over is not None :
3280+ if disabled and self .mouse_hover and self .app .mouse_over is not None :
32813281 # Ensure widget gets a Leave if it is disabled while hovered
32823282 self ._message_queue .put_nowait (events .Leave (self .app .mouse_over ))
32833283 try :
@@ -3848,11 +3848,11 @@ 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_over = False
3851+ self .mouse_hover = False
38523852 self .hover_style = Style ()
38533853
38543854 def _on_enter (self , event : events .Enter ) -> None :
3855- self .mouse_over = True
3855+ self .mouse_hover = True
38563856
38573857 def _on_focus (self , event : events .Focus ) -> None :
38583858 self .has_focus = True
0 commit comments