1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-15 20:19:23 +00:00

TR-core: call layout.paint after each debug button-event

This commit is contained in:
grdddj 2023-04-17 12:11:59 +02:00
parent a4e2859202
commit a8f94d7fc3

View File

@ -77,18 +77,23 @@ class RustLayout(ui.Layout):
def _press_left(self) -> Any:
"""Triggers left button press."""
self.layout.button_event(io.BUTTON_PRESSED, io.BUTTON_LEFT)
self._paint()
return self.layout.button_event(io.BUTTON_RELEASED, io.BUTTON_LEFT)
def _press_right(self) -> Any:
"""Triggers right button press."""
self.layout.button_event(io.BUTTON_PRESSED, io.BUTTON_RIGHT)
self._paint()
return self.layout.button_event(io.BUTTON_RELEASED, io.BUTTON_RIGHT)
def _press_middle(self) -> Any:
"""Triggers middle button press."""
self.layout.button_event(io.BUTTON_PRESSED, io.BUTTON_LEFT)
self._paint()
self.layout.button_event(io.BUTTON_PRESSED, io.BUTTON_RIGHT)
self._paint()
self.layout.button_event(io.BUTTON_RELEASED, io.BUTTON_LEFT)
self._paint()
return self.layout.button_event(io.BUTTON_RELEASED, io.BUTTON_RIGHT)
def _press_button(self, btn_to_press: DebugPhysicalButton) -> Any: