mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-23 07:58:09 +00:00
src/trezor/ui/word_select: remove 15-word variant
This commit is contained in:
parent
213e1b32ec
commit
168cbabbf5
@ -5,7 +5,6 @@ from trezor.ui import Widget
|
||||
from trezor.ui.button import Button, BTN_CLICKED
|
||||
|
||||
_W12 = const(12)
|
||||
_W15 = const(15)
|
||||
_W18 = const(18)
|
||||
_W24 = const(24)
|
||||
|
||||
@ -14,26 +13,21 @@ class WordSelector(Widget):
|
||||
|
||||
def __init__(self, content):
|
||||
self.content = content
|
||||
self.w12 = Button(ui.grid(8, n_y=4, n_x=4, cells_x=2), str(_W12),
|
||||
self.w12 = Button(ui.grid(6, n_y=4, n_x=3, cells_y=2), str(_W12),
|
||||
style=ui.BTN_KEY)
|
||||
self.w15 = Button(ui.grid(10, n_y=4, n_x=4, cells_x=2), str(_W15),
|
||||
self.w18 = Button(ui.grid(7, n_y=4, n_x=3, cells_y=2), str(_W18),
|
||||
style=ui.BTN_KEY)
|
||||
self.w18 = Button(ui.grid(12, n_y=4, n_x=4, cells_x=2), str(_W18),
|
||||
style=ui.BTN_KEY)
|
||||
self.w24 = Button(ui.grid(14, n_y=4, n_x=4, cells_x=2), str(_W24),
|
||||
self.w24 = Button(ui.grid(8, n_y=4, n_x=3, cells_y=2), str(_W24),
|
||||
style=ui.BTN_KEY)
|
||||
|
||||
def render(self):
|
||||
self.w12.render()
|
||||
self.w15.render()
|
||||
self.w18.render()
|
||||
self.w24.render()
|
||||
|
||||
def touch(self, event, pos):
|
||||
if self.w12.touch(event, pos) == BTN_CLICKED:
|
||||
return _W12
|
||||
if self.w15.touch(event, pos) == BTN_CLICKED:
|
||||
return _W15
|
||||
if self.w18.touch(event, pos) == BTN_CLICKED:
|
||||
return _W18
|
||||
if self.w24.touch(event, pos) == BTN_CLICKED:
|
||||
|
Loading…
Reference in New Issue
Block a user