@@ -54,18 +54,21 @@ class Button(ButtonBase):
54
54
Defaults to RECT.
55
55
:param Optional[Union[int, Tuple[int, int, int]]] fill_color: The color to fill the button.
56
56
Accepts an int or a tuple of 3 integers representing RGB values. Defaults to 0xFFFFFF.
57
- :param Optional[Union[int, Tuple[int, int, int]]] outline_color: The color of the outline of the button.
58
- Accepts an int or a tuple of 3 integers representing RGB values. Defaults to 0x0.
57
+ :param Optional[Union[int, Tuple[int, int, int]]] outline_color: The color of the outline of the
58
+ button. Accepts an int or a tuple of 3 integers representing RGB values. Defaults to 0x0.
59
59
:param Optional[str] label: The text that appears inside the button.
60
60
:param Optional[FontProtocol] label_font: The button label font. Defaults to ''terminalio.FONT''
61
- :param Optional[Union[int, Tuple[int, int, int]]] label_color: The color of the button label text.
62
- Accepts an int or a tuple of 3 integers representing RGB values. Defaults to 0x0.
63
- :param Optional[Union[int, Tuple[int, int, int]]] selected_fill: The fill color when the button is selected.
64
- Accepts an int or a tuple of 3 integers representing RGB values. Defaults to the inverse of the fill_color.
65
- :param Optional[Union[int, Tuple[int, int, int]]] selected_outline: The outline color when the button is selected.
66
- Accepts an int or a tuple of 3 integers representing RGB values. Defaults to the inverse of outline_color.
67
- :param Optional[Union[int, Tuple[int, int, int]]] selected_label: The label color when the button is selected.
68
- Accepts an int or a tuple of 3 integers representing RGB values. Defaults to inverting the label_color.
61
+ :param Optional[Union[int, Tuple[int, int, int]]] label_color: The color of the button label
62
+ text. Accepts an int or a tuple of 3 integers representing RGB values. Defaults to 0x0.
63
+ :param Optional[Union[int, Tuple[int, int, int]]] selected_fill: The fill color when the
64
+ button is selected. Accepts an int or a tuple of 3 integers representing RGB values.
65
+ Defaults to the inverse of the fill_color.
66
+ :param Optional[Union[int, Tuple[int, int, int]]] selected_outline: The outline color when the
67
+ button is selected. Accepts an int or a tuple of 3 integers representing RGB values.
68
+ Defaults to the inverse of outline_color.
69
+ :param Optional[Union[int, Tuple[int, int, int]]] selected_label: The label color when the
70
+ button is selected. Accepts an int or a tuple of 3 integers representing RGB values.
71
+ Defaults to inverting the label_color.
69
72
:param Optional[int] label_scale: The scale factor used for the label. Defaults to 1.
70
73
"""
71
74
@@ -141,14 +144,14 @@ def __init__(
141
144
height : int ,
142
145
name : Optional [str ] = None ,
143
146
style = RECT ,
144
- fill_color : Optional [Union [int , tuple [int , int , int ]]] = 0xFFFFFF ,
145
- outline_color : Optional [Union [int , tuple [int , int , int ]]] = 0x0 ,
147
+ fill_color : Optional [Union [int , Tuple [int , int , int ]]] = 0xFFFFFF ,
148
+ outline_color : Optional [Union [int , Tuple [int , int , int ]]] = 0x0 ,
146
149
label : Optional [str ] = None ,
147
150
label_font : Optional [FontProtocol ] = None ,
148
- label_color : Optional [Union [int , tuple [int , int , int ]]] = 0x0 ,
149
- selected_fill : Optional [Union [int , tuple [int , int , int ]]] = None ,
150
- selected_outline : Optional [Union [int , tuple [int , int , int ]]] = None ,
151
- selected_label : Optional [Union [int , tuple [int , int , int ]]] = None ,
151
+ label_color : Optional [Union [int , Tuple [int , int , int ]]] = 0x0 ,
152
+ selected_fill : Optional [Union [int , Tuple [int , int , int ]]] = None ,
153
+ selected_outline : Optional [Union [int , Tuple [int , int , int ]]] = None ,
154
+ selected_label : Optional [Union [int , Tuple [int , int , int ]]] = None ,
152
155
label_scale : Optional [int ] = 1
153
156
):
154
157
super ().__init__ (
@@ -222,7 +225,7 @@ def fill_color(self) -> Optional[int]:
222
225
return self ._fill_color
223
226
224
227
@fill_color .setter
225
- def fill_color (self , new_color : Union [int , tuple [int , int , int ]]) -> None :
228
+ def fill_color (self , new_color : Union [int , Tuple [int , int , int ]]) -> None :
226
229
self ._fill_color = _check_color (new_color )
227
230
if not self .selected :
228
231
self .body .fill = self ._fill_color
@@ -233,7 +236,7 @@ def outline_color(self) -> Optional[int]:
233
236
return self ._outline_color
234
237
235
238
@outline_color .setter
236
- def outline_color (self , new_color : Union [int , tuple [int , int , int ]]) -> None :
239
+ def outline_color (self , new_color : Union [int , Tuple [int , int , int ]]) -> None :
237
240
self ._outline_color = _check_color (new_color )
238
241
if not self .selected :
239
242
self .body .outline = self ._outline_color
@@ -244,7 +247,7 @@ def selected_fill(self) -> Optional[int]:
244
247
return self ._selected_fill
245
248
246
249
@selected_fill .setter
247
- def selected_fill (self , new_color : Union [int , tuple [int , int , int ]]) -> None :
250
+ def selected_fill (self , new_color : Union [int , Tuple [int , int , int ]]) -> None :
248
251
self ._selected_fill = _check_color (new_color )
249
252
if self .selected :
250
253
self .body .fill = self ._selected_fill
@@ -255,7 +258,7 @@ def selected_outline(self) -> Optional[int]:
255
258
return self ._selected_outline
256
259
257
260
@selected_outline .setter
258
- def selected_outline (self , new_color : Union [int , tuple [int , int , int ]]) -> None :
261
+ def selected_outline (self , new_color : Union [int , Tuple [int , int , int ]]) -> None :
259
262
self ._selected_outline = _check_color (new_color )
260
263
if self .selected :
261
264
self .body .outline = self ._selected_outline
0 commit comments