From 80b83add7373003443e332109b7e983a5f23b1da Mon Sep 17 00:00:00 2001 From: Peter Jensen Date: Wed, 22 Mar 2017 14:47:02 +0100 Subject: [PATCH] trezor.ui: text as widget --- src/apps/management/wipe_device.py | 4 ++-- src/trezor/ui/text.py | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/apps/management/wipe_device.py b/src/apps/management/wipe_device.py index 98adca29a7..732683f38d 100644 --- a/src/apps/management/wipe_device.py +++ b/src/apps/management/wipe_device.py @@ -10,9 +10,9 @@ async def layout_wipe_device(session_id, msg): from ..common import storage await hold_to_confirm(session_id, Text( - 'Wiping device', + 'WIPE DEVICE', ui.ICON_WIPE, - ui.BOLD, 'Do you really want to', 'wipe the device?', + ui.NORMAL, 'Do you really want to', 'wipe the device?', ui.NORMAL, '', 'All data will be lost.')) storage.wipe() diff --git a/src/trezor/ui/text.py b/src/trezor/ui/text.py index 898fb49687..5ef9569e70 100644 --- a/src/trezor/ui/text.py +++ b/src/trezor/ui/text.py @@ -1,12 +1,13 @@ from micropython import const from trezor import ui +from trezor.ui import Widget TEXT_HEADER_HEIGHT = const(32) TEXT_LINE_HEIGHT = const(23) TEXT_MARGIN_LEFT = const(10) -class Text: +class Text(Widget): def __init__(self, header_text, header_icon, *content): self.header_text = header_text