mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Swap the radio button to using a circular character for the inner
This commit is contained in:
@@ -21,6 +21,7 @@ class RadioButton(ToggleButton):
|
|||||||
self,
|
self,
|
||||||
label: str,
|
label: str,
|
||||||
value: bool = False,
|
value: bool = False,
|
||||||
|
button_first: bool = True,
|
||||||
*,
|
*,
|
||||||
name: str | None = None,
|
name: str | None = None,
|
||||||
id: str | None = None,
|
id: str | None = None,
|
||||||
@@ -29,13 +30,14 @@ class RadioButton(ToggleButton):
|
|||||||
"""Initialise the radio button.
|
"""Initialise the radio button.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
|
label: The label for the toggle.
|
||||||
value: The initial value of the radio button. Defaults to `False`.
|
value: The initial value of the radio button. Defaults to `False`.
|
||||||
|
button_first: Should the button come before the label, or after?
|
||||||
name: The name of the radio button.
|
name: The name of the radio button.
|
||||||
id: The ID of the radio button in the DOM.
|
id: The ID of the radio button in the DOM.
|
||||||
classes: The CSS classes of the radio button.
|
classes: The CSS classes of the radio button.
|
||||||
"""
|
"""
|
||||||
super().__init__(label, value, name=name, id=id, classes=classes)
|
super().__init__(label, value, button_first, name=name, id=id, classes=classes)
|
||||||
self.button_prefix = "("
|
self.button_prefix = "("
|
||||||
self.button_suffix = ")"
|
self.button_suffix = ")"
|
||||||
self.button_on = "*"
|
self.button_on = "⦿"
|
||||||
self.button_off = " "
|
|
||||||
|
|||||||
Reference in New Issue
Block a user