mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-22 23:48:12 +00:00
fix pagination of seed
This commit is contained in:
parent
cd35a592a1
commit
7237321470
@ -55,8 +55,8 @@ def layout_reset_device(m):
|
|||||||
index = i + page * words_per_page
|
index = i + page * words_per_page
|
||||||
word = mnemonic_words[index]
|
word = mnemonic_words[index]
|
||||||
top = 74 + i * 30
|
top = 74 + i * 30
|
||||||
ui.display.text(10, top, '%d.' % (index + 1), ui.BOLD, ui.LIGHT_GREEN, ui.BLACK)
|
ui.display.text_right(40, top, '%d.' % (index + 1), ui.BOLD, ui.LIGHT_GREEN, ui.BLACK)
|
||||||
ui.display.text(40, top, '%s' % word, ui.BOLD, ui.WHITE, ui.BLACK)
|
ui.display.text(45, top, '%s' % word, ui.BOLD, ui.WHITE, ui.BLACK)
|
||||||
|
|
||||||
def paginate():
|
def paginate():
|
||||||
count = len(mnemonic_words) // words_per_page
|
count = len(mnemonic_words) // words_per_page
|
||||||
@ -65,9 +65,9 @@ def layout_reset_device(m):
|
|||||||
render(page)
|
render(page)
|
||||||
degrees = yield from Swipe().wait()
|
degrees = yield from Swipe().wait()
|
||||||
if degrees == SWIPE_UP:
|
if degrees == SWIPE_UP:
|
||||||
page = max(page + 1, 0)
|
page = min(page + 1, count - 1)
|
||||||
elif degrees == SWIPE_DOWN:
|
elif degrees == SWIPE_DOWN:
|
||||||
page = min(page - 1, count)
|
page = max(page - 1, 0)
|
||||||
|
|
||||||
def animate_arrow():
|
def animate_arrow():
|
||||||
def func(foreground):
|
def func(foreground):
|
||||||
|
Loading…
Reference in New Issue
Block a user