mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-29 10:58:21 +00:00
experimenting with ui in reset_device
This commit is contained in:
parent
299c616d1b
commit
dbfb06d30e
@ -75,16 +75,19 @@ async def show_mnemonic_page(page, page_count, mnemonic):
|
||||
|
||||
ui.clear()
|
||||
ui.display.text(
|
||||
10, 30, 'Write down your seed', ui.BOLD, ui.LIGHT_GREEN, ui.BLACK)
|
||||
10, 34, 'Write down your seed', ui.BOLD, ui.LIGHT_GREEN, ui.BLACK)
|
||||
render_scrollbar(page, page_count)
|
||||
|
||||
for pi, (wi, word) in enumerate(mnemonic[page]):
|
||||
top = pi * 30 + 74
|
||||
top = pi * 35 + 68
|
||||
pos = wi + 1
|
||||
ui.display.text_right(
|
||||
15, top, '%d.' % pos, ui.BOLD, ui.LIGHT_GREEN, ui.BLACK)
|
||||
offset = 0
|
||||
if pos > 9:
|
||||
offset += 12
|
||||
ui.display.text(
|
||||
40, top, '%s' % word, ui.BOLD, ui.WHITE, ui.BLACK)
|
||||
10, top, '%d.' % pos, ui.BOLD, ui.DARK_GREY, ui.BLACK)
|
||||
ui.display.text(
|
||||
30 + offset, top, '%s' % word, ui.BOLD, ui.WHITE, ui.BLACK)
|
||||
|
||||
if page + 1 == page_count:
|
||||
await Button(
|
||||
|
@ -35,9 +35,9 @@ def render_swipe_icon(fg):
|
||||
|
||||
def render_scrollbar(page, page_count):
|
||||
screen_height = const(220)
|
||||
size = const(8)
|
||||
size = const(10)
|
||||
|
||||
padding = 15
|
||||
padding = 18
|
||||
if page_count * padding > screen_height:
|
||||
padding = screen_height // page_count
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user