mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-22 14:28:07 +00:00
src/trezor/ui/passphrase: added space btn icon to keyboard
This commit is contained in:
parent
34c6fb987a
commit
a83d7b9067
BIN
assets/space.png
Normal file
BIN
assets/space.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 968 B |
BIN
src/trezor/res/space.toig
Normal file
BIN
src/trezor/res/space.toig
Normal file
Binary file not shown.
@ -4,11 +4,12 @@ from trezor.ui import display
|
||||
from trezor.ui.button import BTN_CLICKED, ICON, Button
|
||||
from trezor.ui.swipe import SWIPE_HORIZONTAL, SWIPE_LEFT, SWIPE_RIGHT, Swipe
|
||||
|
||||
SPACE = res.load(ui.ICON_SPACE)
|
||||
|
||||
KEYBOARD_KEYS = (
|
||||
('1', '2', '3', '4', '5', '6', '7', '8', '9', '0'),
|
||||
(' ', 'abc', 'def', 'ghi', 'jkl', 'mno', 'pqrs', 'tuv', 'wxyz', '*#'),
|
||||
(' ', 'ABC', 'DEF', 'GHI', 'JKL', 'MNO', 'PQRS', 'TUV', 'WXYZ', '*#'),
|
||||
(SPACE, 'abc', 'def', 'ghi', 'jkl', 'mno', 'pqrs', 'tuv', 'wxyz', '*#'),
|
||||
(SPACE, 'ABC', 'DEF', 'GHI', 'JKL', 'MNO', 'PQRS', 'TUV', 'WXYZ', '*#'),
|
||||
('_', '.', '/', '!', '+', '-', '?', ',', ';', '$'))
|
||||
|
||||
|
||||
@ -127,7 +128,10 @@ class PassphraseKeyboard(ui.Widget):
|
||||
content = content[:-1] + btn.content[index]
|
||||
else:
|
||||
index = 0
|
||||
if isinstance(btn.content[0], str):
|
||||
content += btn.content[0]
|
||||
else:
|
||||
content += ' '
|
||||
self.edit(content, btn, index)
|
||||
return
|
||||
|
||||
|
@ -57,6 +57,7 @@ ICON_BACK = 'trezor/res/left.toig'
|
||||
ICON_NOCOPY = 'trezor/res/nocopy.toig'
|
||||
ICON_SWIPE = 'trezor/res/swipedown.toig'
|
||||
ICON_CHECK = 'trezor/res/check.toig'
|
||||
ICON_SPACE = 'trezor/res/space.toig'
|
||||
|
||||
# buttons
|
||||
BTN_DEFAULT = {
|
||||
|
Loading…
Reference in New Issue
Block a user