mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-22 22:38:08 +00:00
ui: clear the screen before common layouts
This commit is contained in:
parent
b2299c118a
commit
cc22d59eca
@ -1,4 +1,4 @@
|
||||
from trezor import wire
|
||||
from trezor import wire, ui
|
||||
from trezor.utils import unimport
|
||||
|
||||
|
||||
@ -9,6 +9,7 @@ async def confirm(session_id, content=None, code=None, *args, **kwargs):
|
||||
from trezor.messages.ButtonRequestType import Other
|
||||
from trezor.messages.wire_types import ButtonAck
|
||||
|
||||
ui.display.clear()
|
||||
dialog = ConfirmDialog(content, *args, **kwargs)
|
||||
dialog.render()
|
||||
|
||||
@ -26,6 +27,7 @@ async def hold_to_confirm(session_id, content=None, code=None, *args, **kwargs):
|
||||
from trezor.messages.ButtonRequestType import Other
|
||||
from trezor.messages.wire_types import ButtonAck
|
||||
|
||||
ui.display.clear()
|
||||
button = Button((0, 240 - 48, 240, 48), 'Hold to confirm',
|
||||
normal_style=CONFIRM_BUTTON,
|
||||
active_style=CONFIRM_BUTTON_ACTIVE)
|
||||
|
@ -16,7 +16,7 @@ async def request_pin(session_id, *args, **kwargs):
|
||||
ButtonRequest(code=ProtectCall),
|
||||
ButtonAck)
|
||||
|
||||
ui.clear()
|
||||
ui.display.clear()
|
||||
matrix = PinMatrix(*args, **kwargs)
|
||||
dialog = ConfirmDialog(matrix)
|
||||
if await dialog != CONFIRMED:
|
||||
|
Loading…
Reference in New Issue
Block a user