1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-01-03 12:00:59 +00:00

trezor.ui: text as widget

This commit is contained in:
Peter Jensen 2017-03-22 14:47:02 +01:00
parent 1e80e82bac
commit 80b83add73
2 changed files with 4 additions and 3 deletions

View File

@ -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()

View File

@ -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