ui: multi touch keyboard support (#35912)

* start

* better

* 2

* dumb
This commit is contained in:
Maxime Desroches
2025-08-03 18:14:48 -07:00
committed by GitHub
parent 623de0e22a
commit 976dfa3982
6 changed files with 44 additions and 30 deletions
+3 -1
View File
@@ -179,6 +179,7 @@ class Button(Widget):
text_padding: int = 20,
enabled: bool = True,
icon = None,
multi_touch: bool = False,
):
super().__init__()
@@ -195,6 +196,7 @@ class Button(Widget):
self._text_padding = text_padding
self._text_size = measure_text_cached(gui_app.font(self._font_weight), self._text, self._font_size)
self._icon = icon
self._multi_touch = multi_touch
self.enabled = enabled
def set_text(self, text):
@@ -208,7 +210,7 @@ class Button(Widget):
def _update_state(self):
if self.enabled:
self._text_color = BUTTON_TEXT_COLOR[self._button_style]
if self._is_pressed:
if self.is_pressed:
self._background_color = BUTTON_PRESSED_BACKGROUND_COLORS[self._button_style]
else:
self._background_color = BUTTON_BACKGROUND_COLORS[self._button_style]