Make ToggleButton event handlers private

See #2324.
This commit is contained in:
Dave Pearson
2023-04-19 10:07:36 +01:00
parent d23024141c
commit 36aa3321ff

View File

@@ -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()