Towards getting rid of [x] during login
This commit is contained in:
parent
7367a525c0
commit
312f93e57e
@ -19,6 +19,8 @@ class Graphics:
|
||||
|
||||
spin = (13, 36, 2, 0, b'\x02\x00\x07\x00\x0f\x80\x1f\xc0\x00\x00\x00\x00\x00\x00\xf2x\x80\x08\x80\x08\x80\x08\x00\x00\x00\x00\x80\x08\x00\x00\x00\x00\x00\x00\x80\x08\x00\x00\x00\x00\x00\x00\x80\x08\x00\x00\x00\x00\x80\x08\x80\x08\x80\x08\xf2x\x00\x00\x00\x00\x00\x00\x1f\xc0\x0f\x80\x07\x00\x02\x00\x00\x00')
|
||||
|
||||
tbox = (13, 21, 2, 0, b'\xff\xf8\x80\x08\x88\x88\x82\x08\x88\x88\x82\x08\x88\x88\x82\x08\x88\x88\x82\x08\x88\x88\x82\x08\x88\x88\x82\x08\x88\x88\x82\x08\x88\x88\x82\x08\x88\x88\x80\x08\xff\xf8')
|
||||
|
||||
wedge = (6, 11, 1, 0, b'\x00\x00\xc0\xe0p8\x1c8p\xe0\xc0')
|
||||
|
||||
xbox = (13, 21, 2, 0, b'\xff\xf8\xa2(\x88\x88\xa2(\x88\x88\xa2(\x88\x88\xa2(\x88\x88\xa2(\x88\x88\xa2(\x88\x88\xa2(\x88\x88\xa2(\x88\x88\xa2(\x88\x88\xa2(\xff\xf8')
|
||||
|
||||
@ -36,9 +36,7 @@ class LoginUX:
|
||||
filled = len(self.pin)
|
||||
if show_hint:
|
||||
filled -= 1
|
||||
hint = self.pin[-1] if not version.has_membrane else '\xd7'
|
||||
else:
|
||||
hint = '' if len(self.pin) == MAX_PIN_PART_LEN else ' '
|
||||
hint = self.pin[-1] if not version.has_membrane else None
|
||||
|
||||
dis.clear()
|
||||
|
||||
@ -56,18 +54,21 @@ class LoginUX:
|
||||
|
||||
y = 26
|
||||
w = 18
|
||||
if 0:
|
||||
x = 64 - ((w * (filled+(1 if hint else 0))) // 2)
|
||||
x += w//2
|
||||
else:
|
||||
x = 12
|
||||
x = 12
|
||||
|
||||
for idx in range(filled):
|
||||
dis.icon(x, y, 'xbox')
|
||||
x += w
|
||||
if hint:
|
||||
dis.text(x+1, y+1, hint, FontLarge)
|
||||
dis.icon(x, y, 'box')
|
||||
|
||||
if show_hint:
|
||||
if not version.has_membrane:
|
||||
dis.text(x+1, y+1, hint, FontLarge)
|
||||
dis.icon(x, y, 'box')
|
||||
else:
|
||||
dis.icon(x, y, 'tbox')
|
||||
else:
|
||||
if len(self.pin) != MAX_PIN_PART_LEN:
|
||||
dis.icon(x, y, 'box')
|
||||
|
||||
# BTW: √ also works here, but looks like square root, not a checkmark
|
||||
if self.footer:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user