experimenting with ui in reset_device

pull/25/head
chren 8 years ago committed by Pavol Rusnak
parent 299c616d1b
commit dbfb06d30e
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D

@ -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…
Cancel
Save