From cb2399197f886e66c6aba7313435e9687fca482d Mon Sep 17 00:00:00 2001 From: chren Date: Thu, 6 Oct 2016 16:35:36 +0200 Subject: [PATCH] fixed wipe device header --- src/apps/management/layout_wipe_device.py | 3 ++- src/trezor/ui/text.py | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/apps/management/layout_wipe_device.py b/src/apps/management/layout_wipe_device.py index ddb6ab8a8..d1bb4d164 100644 --- a/src/apps/management/layout_wipe_device.py +++ b/src/apps/management/layout_wipe_device.py @@ -10,8 +10,9 @@ async def layout_wipe_device(message, session_id): from ..common import storage ui.display.clear() - ui.header('Wiping device', ui.ICON_WIPE, ui.BLACK, ui.LIGHT_GREEN) content = Text( + 'Wiping device', + ui.ICON_WIPE, ui.BOLD, 'Do you really want to', 'wipe the device?', ui.NORMAL, '', 'All data will be lost.') await hold_to_confirm(session_id, content) diff --git a/src/trezor/ui/text.py b/src/trezor/ui/text.py index 523c067da..32d43c255 100644 --- a/src/trezor/ui/text.py +++ b/src/trezor/ui/text.py @@ -8,14 +8,16 @@ TEXT_MARGIN_LEFT = const(10) class Text: - def __init__(self, header, *content): + def __init__(self, header, icon, *content): self.header = header + self.icon = icon self.content = content def render(self): offset = TEXT_LINE_HEIGHT offset += TEXT_HEADER_HEIGHT style = ui.NORMAL + ui.header(self.header, self.icon, ui.BLACK, ui.LIGHT_GREEN) for item in self.content: if isinstance(item, str): ui.display.text(TEXT_MARGIN_LEFT, offset,