1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-23 14:58:09 +00:00

apps/common/request_pin: test ui.layout

This commit is contained in:
Jan Pochyla 2017-10-09 15:34:10 +02:00
parent 23fecb0ce4
commit 4fa5e36053

View File

@ -9,7 +9,7 @@ DEFAULT_CANCEL = res.load(ui.ICON_CLEAR)
DEFAULT_LOCK = res.load(ui.ICON_LOCK) DEFAULT_LOCK = res.load(ui.ICON_LOCK)
@unimport @ui.layout
async def request_pin_on_display(ctx: wire.Context, code: int=None) -> str: async def request_pin_on_display(ctx: wire.Context, code: int=None) -> str:
from trezor.messages.ButtonRequest import ButtonRequest from trezor.messages.ButtonRequest import ButtonRequest
from trezor.messages.ButtonRequestType import ProtectCall from trezor.messages.ButtonRequestType import ProtectCall
@ -41,6 +41,7 @@ async def request_pin_on_display(ctx: wire.Context, code: int=None) -> str:
dialog = ConfirmDialog(matrix) dialog = ConfirmDialog(matrix)
dialog.cancel.area = (0, 240 - 48, 80, 48) dialog.cancel.area = (0, 240 - 48, 80, 48)
dialog.confirm.area = (240 - 80, 240 - 48, 80, 48) dialog.confirm.area = (240 - 80, 240 - 48, 80, 48)
matrix.onchange()
while True: while True:
res = await dialog res = await dialog