mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-22 22:38:08 +00:00
ui/pin: change design of pin bullets
This commit is contained in:
parent
ac0be4b061
commit
9c84b742a0
@ -40,9 +40,19 @@ class PinMatrix(ui.Widget):
|
||||
# clear canvas under input line
|
||||
display.bar(0, 0, 240, 45, ui.BG)
|
||||
|
||||
# input line with a header
|
||||
header = '*' * len(self.pin) if self.pin else self.label
|
||||
display.text_center(120, 36, header, ui.BOLD, ui.GREY, ui.BG)
|
||||
if self.pin:
|
||||
# input line with pin
|
||||
l = len(self.pin)
|
||||
y = const(20)
|
||||
size = const(10)
|
||||
padding = const(14)
|
||||
box_w = const(240)
|
||||
x = (box_w - l * padding) // 2
|
||||
for i in range(0, l):
|
||||
ui.display.bar_radius(x + i * padding, y, size, size, ui.GREY, ui.BG, 4)
|
||||
else:
|
||||
# input line with header label
|
||||
display.text_center(120, 36, self.label, ui.BOLD, ui.GREY, ui.BG)
|
||||
|
||||
# pin matrix buttons
|
||||
for btn in self.pin_buttons:
|
||||
|
Loading…
Reference in New Issue
Block a user