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:
parent
1e80e82bac
commit
80b83add73
@ -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()
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user