added clear screen to bootloader mockups

This commit is contained in:
chren 2016-10-05 20:17:32 +02:00
parent 036a4ead33
commit 7a6f6b9d59
9 changed files with 18 additions and 11 deletions

View File

@ -17,7 +17,7 @@ DEFAULT_BUTTON_ACTIVE = {
'text-style': ui.BOLD, 'text-style': ui.BOLD,
'border-color': ui.GREY, 'border-color': ui.GREY,
} }
ui.display.clear()
ui.display.backlight(255) ui.display.backlight(255)
image = res.load('./res/sl_logo.toif') image = res.load('./res/sl_logo.toif')
@ -30,4 +30,4 @@ reboot = button.Button((0, 240 - 48, 240, 48), 'Reboot', normal_style=DEFAULT_BU
reboot.render() reboot.render()
while True: while True:
ui.display.refresh() if hasattr(ui.display, 'refresh'): ui.display.refresh()

View File

@ -4,6 +4,7 @@ sys.path.append('../../src')
from trezor import ui, res from trezor import ui, res
ui.display.clear()
ui.display.backlight(255) ui.display.backlight(255)
image = res.load('./res/monero_logo.toif') image = res.load('./res/monero_logo.toif')
@ -13,4 +14,4 @@ ui.display.text_center(120, 192, "MONERO", ui.BOLD, ui.WHITE, ui.BLACK)
ui.display.text_center(120, 215, "v0.1.1", 1, ui.GREY, ui.BLACK) ui.display.text_center(120, 215, "v0.1.1", 1, ui.GREY, ui.BLACK)
while True: while True:
ui.display.refresh() if hasattr(ui.display, 'refresh'): ui.display.refresh()

View File

@ -4,6 +4,7 @@ sys.path.append('../../src')
from trezor import ui, res from trezor import ui, res
ui.display.clear()
ui.display.backlight(255) ui.display.backlight(255)
image = res.load('../../src/apps/homescreen/res/trezor.toig') image = res.load('../../src/apps/homescreen/res/trezor.toig')
@ -15,4 +16,4 @@ ui.display.text_center(120, 192 + 32, "Visit TREZOR.io/start", 1, ui.WHITE, ui.B
while True: while True:
ui.display.refresh() if hasattr(ui.display, 'refresh'): ui.display.refresh()

View File

@ -18,6 +18,7 @@ DEFAULT_BUTTON_ACTIVE = {
'border-color': ui.GREY, 'border-color': ui.GREY,
} }
ui.display.clear()
ui.display.backlight(255) ui.display.backlight(255)
# background frame # background frame
@ -41,4 +42,4 @@ reboot = button.Button((0, 240 - 48, 240, 48), 'Reboot', normal_style=DEFAULT_BU
reboot.render() reboot.render()
while True: while True:
ui.display.refresh() if hasattr(ui.display, 'refresh'): ui.display.refresh()

View File

@ -30,6 +30,7 @@ CANCEL_BUTTON_ACTIVE = {
'border-color': ui.RED, 'border-color': ui.RED,
} }
ui.display.clear()
ui.display.backlight(255) ui.display.backlight(255)
# header # header
@ -59,4 +60,4 @@ cancel = button.Button((0, 240 - 48, 119, 48), 'Cancel', normal_style=CANCEL_BUT
cancel.render() cancel.render()
while True: while True:
ui.display.refresh() if hasattr(ui.display, 'refresh'): ui.display.refresh()

View File

@ -18,6 +18,7 @@ CONFIRM_BUTTON_ACTIVE = {
'border-color': ui.BLACK, 'border-color': ui.BLACK,
} }
ui.display.clear()
ui.display.backlight(255) ui.display.backlight(255)
# header # header
@ -41,4 +42,4 @@ confirm = button.Button((0, 240 - 48, 240, 48), 'Hold to confirm', normal_style=
confirm.render() confirm.render()
while True: while True:
ui.display.refresh() if hasattr(ui.display, 'refresh'): ui.display.refresh()

View File

@ -18,6 +18,7 @@ DEFAULT_BUTTON_ACTIVE = {
'border-color': ui.GREY, 'border-color': ui.GREY,
} }
ui.display.clear()
ui.display.backlight(255) ui.display.backlight(255)
# header # header
@ -38,4 +39,4 @@ reboot = button.Button((0, 240 - 48, 240, 48), 'Reboot', normal_style=DEFAULT_BU
reboot.render() reboot.render()
while True: while True:
ui.display.refresh() if hasattr(ui.display, 'refresh'): ui.display.refresh()

View File

@ -4,9 +4,9 @@ sys.path.append('../../src')
from trezor import ui, res from trezor import ui, res
ui.display.clear()
ui.display.backlight(255) ui.display.backlight(255)
# header # header
ui.display.bar(0, 0, 240, 32, ui.ORANGE, ui.BLACK, 4) ui.display.bar(0, 0, 240, 32, ui.ORANGE, ui.BLACK, 4)
ui.display.bar(0, 10, 240, 22, ui.ORANGE) ui.display.bar(0, 10, 240, 22, ui.ORANGE)
@ -24,6 +24,6 @@ while True:
ui.display.loader(p, ui.BLUE, ui.BLACK) ui.display.loader(p, ui.BLUE, ui.BLACK)
ui.display.text_center(120, 240 // 2 + 14 // 2, "%d%%" % (p // 10), 2, ui.WHITE, ui.BLACK) ui.display.text_center(120, 240 // 2 + 14 // 2, "%d%%" % (p // 10), 2, ui.WHITE, ui.BLACK)
ui.display.refresh() if hasattr(ui.display, 'refresh'): ui.display.refresh()
p = (p + 1) % 1000 p = (p + 1) % 1000

View File

@ -30,6 +30,7 @@ CANCEL_BUTTON_ACTIVE = {
'border-color': ui.RED, 'border-color': ui.RED,
} }
ui.display.clear()
ui.display.backlight(255) ui.display.backlight(255)
# background frame # background frame
@ -62,4 +63,4 @@ cancel = button.Button((0, 240 - 48, 119, 48), 'Cancel', normal_style=CANCEL_BUT
cancel.render() cancel.render()
while True: while True:
ui.display.refresh() if hasattr(ui.display, 'refresh'): ui.display.refresh()