raylib: revert 0 button padding (#36360)

* back to 20

* here only
This commit is contained in:
Shane Smiskol
2025-10-15 01:38:00 -07:00
committed by GitHub
parent 2fd4b53aaf
commit ec33519dc7
2 changed files with 4 additions and 3 deletions
+1 -1
View File
@@ -86,7 +86,7 @@ class Button(Widget):
button_style: ButtonStyle = ButtonStyle.NORMAL,
border_radius: int = 10,
text_alignment: TextAlignment = TextAlignment.CENTER,
text_padding: int = 0,
text_padding: int = 20,
icon=None,
multi_touch: bool = False,
):
+3 -2
View File
@@ -95,6 +95,7 @@ class ButtonAction(ItemAction):
button_style=ButtonStyle.LIST_ACTION,
border_radius=BUTTON_BORDER_RADIUS,
click_callback=pressed,
text_padding=0,
)
self.set_enabled(enabled)
@@ -174,8 +175,8 @@ class DualButtonAction(ItemAction):
super().__init__(width=0, enabled=enabled) # Width 0 means use full width
self.left_text, self.right_text = left_text, right_text
self.left_button = Button(left_text, click_callback=left_callback, button_style=ButtonStyle.LIST_ACTION)
self.right_button = Button(right_text, click_callback=right_callback, button_style=ButtonStyle.DANGER)
self.left_button = Button(left_text, click_callback=left_callback, button_style=ButtonStyle.LIST_ACTION, text_padding=0)
self.right_button = Button(right_text, click_callback=right_callback, button_style=ButtonStyle.DANGER, text_padding=0)
def set_touch_valid_callback(self, touch_callback: Callable[[], bool]) -> None:
super().set_touch_valid_callback(touch_callback)