mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
@@ -12,6 +12,7 @@ from rich.text import Text, TextType
|
|||||||
|
|
||||||
from ..app import RenderResult
|
from ..app import RenderResult
|
||||||
from ..binding import Binding, BindingType
|
from ..binding import Binding, BindingType
|
||||||
|
from ..events import Click
|
||||||
from ..geometry import Size
|
from ..geometry import Size
|
||||||
from ..message import Message
|
from ..message import Message
|
||||||
from ..reactive import reactive
|
from ..reactive import reactive
|
||||||
@@ -220,7 +221,7 @@ class ToggleButton(Static, can_focus=True):
|
|||||||
"""
|
"""
|
||||||
self.toggle()
|
self.toggle()
|
||||||
|
|
||||||
def on_click(self) -> None:
|
async def _on_click(self, _: Click) -> None:
|
||||||
"""Toggle the value of the widget when clicked with the mouse."""
|
"""Toggle the value of the widget when clicked with the mouse."""
|
||||||
self.toggle()
|
self.toggle()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user