1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-25 17:09:44 +00:00

experimenting with ui in reset_device

This commit is contained in:
chren 2016-09-26 20:37:34 +02:00 committed by Pavol Rusnak
parent 299c616d1b
commit dbfb06d30e
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D
2 changed files with 10 additions and 7 deletions

View File

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

View File

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