mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-06-08 00:58:46 +00:00
src: fix flake whitespace issues
This commit is contained in:
parent
a9aa5febda
commit
46fc37f977
@ -64,7 +64,6 @@ async def reset_device(ctx, msg):
|
|||||||
break
|
break
|
||||||
await show_wrong_entry(ctx)
|
await show_wrong_entry(ctx)
|
||||||
|
|
||||||
|
|
||||||
# write PIN into storage
|
# write PIN into storage
|
||||||
if not config.change_pin('', newpin):
|
if not config.change_pin('', newpin):
|
||||||
raise wire.FailureError(
|
raise wire.FailureError(
|
||||||
|
@ -70,7 +70,7 @@ class Button(Widget):
|
|||||||
ui.BG,
|
ui.BG,
|
||||||
radius)
|
radius)
|
||||||
display.bar_radius(ax + BORDER, ay + BORDER,
|
display.bar_radius(ax + BORDER, ay + BORDER,
|
||||||
aw - BORDER*2, ah - BORDER*2,
|
aw - BORDER * 2, ah - BORDER * 2,
|
||||||
bg_color,
|
bg_color,
|
||||||
border_color,
|
border_color,
|
||||||
radius)
|
radius)
|
||||||
@ -84,14 +84,14 @@ class Button(Widget):
|
|||||||
|
|
||||||
def render_content(self, s, ax, ay, aw, ah):
|
def render_content(self, s, ax, ay, aw, ah):
|
||||||
c = self.content
|
c = self.content
|
||||||
tx = ax + aw//2
|
tx = ax + aw // 2
|
||||||
ty = ay + ah//2 + 8
|
ty = ay + ah // 2 + 8
|
||||||
if isinstance(c, str):
|
if isinstance(c, str):
|
||||||
display.text_center(
|
display.text_center(
|
||||||
tx, ty, c, s['text-style'], s['fg-color'], s['bg-color'])
|
tx, ty, c, s['text-style'], s['fg-color'], s['bg-color'])
|
||||||
else:
|
else:
|
||||||
display.icon(
|
display.icon(
|
||||||
tx - ICON//2, ty - ICON, c, s['fg-color'], s['bg-color'])
|
tx - ICON // 2, ty - ICON, c, s['fg-color'], s['bg-color'])
|
||||||
|
|
||||||
def touch(self, event, pos):
|
def touch(self, event, pos):
|
||||||
state = self.state
|
state = self.state
|
||||||
|
@ -59,7 +59,7 @@ class Input(Button):
|
|||||||
i = self.icon # rendered icon
|
i = self.icon # rendered icon
|
||||||
|
|
||||||
tx = ax + 24 # x-offset of the content
|
tx = ax + 24 # x-offset of the content
|
||||||
ty = ay + ah//2 + 8 # y-offset of the content
|
ty = ay + ah // 2 + 8 # y-offset of the content
|
||||||
|
|
||||||
# input content and the suggested word
|
# input content and the suggested word
|
||||||
display.text(tx, ty, t, text_style, fg_color, bg_color)
|
display.text(tx, ty, t, text_style, fg_color, bg_color)
|
||||||
@ -72,7 +72,7 @@ class Input(Button):
|
|||||||
display.bar(px, ty + 2, pw + 1, 3, fg_color)
|
display.bar(px, ty + 2, pw + 1, 3, fg_color)
|
||||||
|
|
||||||
if i: # icon
|
if i: # icon
|
||||||
ix = ax + aw - ICON*2
|
ix = ax + aw - ICON * 2
|
||||||
iy = ty - ICON
|
iy = ty - ICON
|
||||||
display.icon(ix, iy, res.load(i), fg_color, bg_color)
|
display.icon(ix, iy, res.load(i), fg_color, bg_color)
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ async def animate_swipe():
|
|||||||
for t in ui.pulse(draw_delay):
|
for t in ui.pulse(draw_delay):
|
||||||
fg = ui.blend(ui.GREY, ui.DARK_GREY, t)
|
fg = ui.blend(ui.GREY, ui.DARK_GREY, t)
|
||||||
ui.display.icon(70, 205, icon, fg, ui.BG)
|
ui.display.icon(70, 205, icon, fg, ui.BG)
|
||||||
ui.display.text_center(130,220, 'Swipe', ui.BOLD, fg, ui.BG)
|
ui.display.text_center(130, 220, 'Swipe', ui.BOLD, fg, ui.BG)
|
||||||
yield sleep
|
yield sleep
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user