1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-26 09:28:13 +00:00

use bar_radius where needed

This commit is contained in:
Pavol Rusnak 2016-10-05 20:36:28 +02:00
parent c5897e71ad
commit e405a6305d
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D
8 changed files with 18 additions and 25 deletions

View File

@ -25,8 +25,7 @@ ui.display.bar(0, 10, 240, 240 - 50, ui.LIGHT_RED)
ui.display.bar(3, 3, 234, 240 - 54, ui.BLACK) ui.display.bar(3, 3, 234, 240 - 54, ui.BLACK)
# header # header
ui.display.bar(0, 0, 240, 32, ui.ORANGE, ui.BLACK, 4) ui.display.bar(0, 0, 240, 32, ui.ORANGE)
ui.display.bar(0, 10, 240, 22, ui.ORANGE)
image = res.load('./res/bootloader.toig') image = res.load('./res/bootloader.toig')
ui.display.icon(8, 4, image, ui.ORANGE, ui.WHITE) ui.display.icon(8, 4, image, ui.ORANGE, ui.WHITE)
@ -48,4 +47,4 @@ cancel = button.Button((0, 240 - 48, 240, 48), 'Proceed anyway', normal_style=CA
cancel.render() cancel.render()
while True: while True:
ui.display.refresh() ui.display.refresh()

View File

@ -26,8 +26,7 @@ ui.display.bar(0, 10, 240, 240 - 50, ui.LIGHT_RED)
ui.display.bar(3, 3, 234, 240 - 54, ui.BLACK) ui.display.bar(3, 3, 234, 240 - 54, ui.BLACK)
# header # header
ui.display.bar(0, 0, 240, 32, ui.ORANGE, ui.BLACK, 4) ui.display.bar(0, 0, 240, 32, ui.ORANGE)
ui.display.bar(0, 10, 240, 22, ui.ORANGE)
image = res.load('./res/bootloader.toig') image = res.load('./res/bootloader.toig')
ui.display.icon(8, 4, image, ui.ORANGE, ui.WHITE) ui.display.icon(8, 4, image, ui.ORANGE, ui.WHITE)
@ -42,4 +41,4 @@ reboot = button.Button((0, 240 - 48, 240, 48), 'Reboot', normal_style=DEFAULT_BU
reboot.render() reboot.render()
while True: while True:
if hasattr(ui.display, 'refresh'): ui.display.refresh() if hasattr(ui.display, 'refresh'): ui.display.refresh()

View File

@ -34,8 +34,7 @@ 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.display.bar(0, 10, 240, 22, ui.ORANGE)
image = res.load('./res/bootloader.toig') image = res.load('./res/bootloader.toig')
ui.display.icon(8, 4, image, ui.ORANGE, ui.WHITE) ui.display.icon(8, 4, image, ui.ORANGE, ui.WHITE)
@ -60,4 +59,4 @@ cancel = button.Button((0, 240 - 48, 119, 48), 'Cancel', normal_style=CANCEL_BUT
cancel.render() cancel.render()
while True: while True:
if hasattr(ui.display, 'refresh'): ui.display.refresh() if hasattr(ui.display, 'refresh'): ui.display.refresh()

View File

@ -22,8 +22,7 @@ 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.display.bar(0, 10, 240, 22, ui.ORANGE)
image = res.load('./res/bootloader.toig') image = res.load('./res/bootloader.toig')
ui.display.icon(8, 4, image, ui.ORANGE, ui.WHITE) ui.display.icon(8, 4, image, ui.ORANGE, ui.WHITE)
@ -42,4 +41,4 @@ confirm = button.Button((0, 240 - 48, 240, 48), 'Hold to confirm', normal_style=
confirm.render() confirm.render()
while True: while True:
if hasattr(ui.display, 'refresh'): ui.display.refresh() if hasattr(ui.display, 'refresh'): ui.display.refresh()

View File

@ -22,8 +22,7 @@ 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.display.bar(0, 10, 240, 22, ui.ORANGE)
image = res.load('./res/bootloader.toig') image = res.load('./res/bootloader.toig')
ui.display.icon(8, 4, image, ui.ORANGE, ui.WHITE) ui.display.icon(8, 4, image, ui.ORANGE, ui.WHITE)
@ -39,4 +38,4 @@ reboot = button.Button((0, 240 - 48, 240, 48), 'Reboot', normal_style=DEFAULT_BU
reboot.render() reboot.render()
while True: while True:
if hasattr(ui.display, 'refresh'): ui.display.refresh() if hasattr(ui.display, 'refresh'): ui.display.refresh()

View File

@ -8,8 +8,7 @@ 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.display.bar(0, 10, 240, 22, ui.ORANGE)
image = res.load('./res/bootloader.toig') image = res.load('./res/bootloader.toig')
ui.display.icon(8, 4, image, ui.ORANGE, ui.WHITE) ui.display.icon(8, 4, image, ui.ORANGE, ui.WHITE)

View File

@ -38,8 +38,7 @@ ui.display.bar(0, 10, 240, 240 - 58, ui.LIGHT_RED)
ui.display.bar(3, 3, 234, 240 - 54, ui.BLACK) ui.display.bar(3, 3, 234, 240 - 54, ui.BLACK)
# header # header
ui.display.bar(0, 0, 240, 32, ui.ORANGE, ui.BLACK, 4) ui.display.bar(0, 0, 240, 32, ui.ORANGE)
ui.display.bar(0, 10, 240, 22, ui.ORANGE)
image = res.load('./res/bootloader.toig') image = res.load('./res/bootloader.toig')
ui.display.icon(8, 4, image, ui.ORANGE, ui.WHITE) ui.display.icon(8, 4, image, ui.ORANGE, ui.WHITE)
@ -63,4 +62,4 @@ cancel = button.Button((0, 240 - 48, 119, 48), 'Cancel', normal_style=CANCEL_BUT
cancel.render() cancel.render()
while True: while True:
if hasattr(ui.display, 'refresh'): ui.display.refresh() if hasattr(ui.display, 'refresh'): ui.display.refresh()

View File

@ -29,9 +29,9 @@ async def animate_swipe():
def render_swipe_icon(fg): def render_swipe_icon(fg):
ui.display.bar(102, 214, 36, 4, fg, ui.BLACK, 2) ui.display.bar_radius(102, 214, 36, 4, fg, ui.BLACK, 2)
ui.display.bar(106, 222, 28, 4, fg, ui.BLACK, 2) ui.display.bar_radius(106, 222, 28, 4, fg, ui.BLACK, 2)
ui.display.bar(110, 230, 20, 4, fg, ui.BLACK, 2) ui.display.bar_radius(110, 230, 20, 4, fg, ui.BLACK, 2)
def render_scrollbar(page, page_count): def render_scrollbar(page, page_count):
@ -47,6 +47,6 @@ def render_scrollbar(page, page_count):
for i in range(0, page_count): for i in range(0, page_count):
if i != page: if i != page:
ui.display.bar(x, y + i * padding, size, ui.display.bar_radius(x, y + i * padding, size,
size, ui.DARK_GREY, ui.BLACK, 4) size, ui.DARK_GREY, ui.BLACK, 4)
ui.display.bar(x, y + page * padding, size, size, ui.WHITE, ui.BLACK, 4) ui.display.bar_radius(x, y + page * padding, size, size, ui.WHITE, ui.BLACK, 4)