Start a small animation to show the button was clicked.
(self)
| 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.""" |