src: fix flake whitespace issues

pull/25/head
Pavol Rusnak 6 years ago
parent a9aa5febda
commit 46fc37f977
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D

@ -64,7 +64,6 @@ async def reset_device(ctx, msg):
break
await show_wrong_entry(ctx)
# write PIN into storage
if not config.change_pin('', newpin):
raise wire.FailureError(

@ -70,7 +70,7 @@ class Button(Widget):
ui.BG,
radius)
display.bar_radius(ax + BORDER, ay + BORDER,
aw - BORDER*2, ah - BORDER*2,
aw - BORDER * 2, ah - BORDER * 2,
bg_color,
border_color,
radius)
@ -84,14 +84,14 @@ class Button(Widget):
def render_content(self, s, ax, ay, aw, ah):
c = self.content
tx = ax + aw//2
ty = ay + ah//2 + 8
tx = ax + aw // 2
ty = ay + ah // 2 + 8
if isinstance(c, str):
display.text_center(
tx, ty, c, s['text-style'], s['fg-color'], s['bg-color'])
else:
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):
state = self.state

@ -59,7 +59,7 @@ class Input(Button):
i = self.icon # rendered icon
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
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)
if i: # icon
ix = ax + aw - ICON*2
ix = ax + aw - ICON * 2
iy = ty - ICON
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):
fg = ui.blend(ui.GREY, ui.DARK_GREY, t)
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

Loading…
Cancel
Save