From dbfb06d30ed4f6e791821953535f75108adc3683 Mon Sep 17 00:00:00 2001 From: chren Date: Mon, 26 Sep 2016 20:37:34 +0200 Subject: [PATCH] experimenting with ui in reset_device --- src/apps/management/layout_reset_device.py | 13 ++++++++----- src/trezor/ui/scroll.py | 4 ++-- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/apps/management/layout_reset_device.py b/src/apps/management/layout_reset_device.py index facbfd89..f8a163b2 100644 --- a/src/apps/management/layout_reset_device.py +++ b/src/apps/management/layout_reset_device.py @@ -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( diff --git a/src/trezor/ui/scroll.py b/src/trezor/ui/scroll.py index baef2a04..1649aa86 100644 --- a/src/trezor/ui/scroll.py +++ b/src/trezor/ui/scroll.py @@ -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