MCPcopy
hub / github.com/Textualize/textual / _start_active_affect

Method _start_active_affect

src/textual/widgets/_button.py:442–448  ·  view source on GitHub ↗

Start a small animation to show the button was clicked.

(self)

Source from the content-addressed store, hash-verified

440 return self
441
442 def _start_active_affect(self) -> None:
443 """Start a small animation to show the button was clicked."""
444 if self.active_effect_duration > 0:
445 self.add_class("-active")
446 self.set_timer(
447 self.active_effect_duration, partial(self.remove_class, "-active")
448 )
449
450 def action_press(self) -> None:
451 """Activate a press of the button."""

Callers 1

pressMethod · 0.95

Calls 2

set_timerMethod · 0.80
add_classMethod · 0.45

Tested by

no test coverage detected