From cc35a006392465667e5ad5656f7e860f2cb74c83 Mon Sep 17 00:00:00 2001 From: chren Date: Mon, 26 Sep 2016 19:24:05 +0200 Subject: [PATCH] removed old playground and some color changes --- src/apps/management/layout_reset_device.py | 4 +- src/apps/playground_chren/__init__.py | 2 - src/apps/playground_chren/layout_loading.py | 16 ------- .../playground_chren/layout_scrollicon.py | 19 -------- src/apps/playground_chren/layout_send_tx.py | 43 ------------------ src/apps/playground_chren/res/arrow-up2.toig | Bin 189 -> 0 bytes src/apps/playground_chren/res/gears3.toig | Bin 1070 -> 0 bytes src/trezor/ui/scroll.py | 4 +- 8 files changed, 4 insertions(+), 84 deletions(-) delete mode 100644 src/apps/playground_chren/__init__.py delete mode 100644 src/apps/playground_chren/layout_loading.py delete mode 100644 src/apps/playground_chren/layout_scrollicon.py delete mode 100644 src/apps/playground_chren/layout_send_tx.py delete mode 100644 src/apps/playground_chren/res/arrow-up2.toig delete mode 100644 src/apps/playground_chren/res/gears3.toig diff --git a/src/apps/management/layout_reset_device.py b/src/apps/management/layout_reset_device.py index 1d5bd4d20..facbfd896 100644 --- a/src/apps/management/layout_reset_device.py +++ b/src/apps/management/layout_reset_device.py @@ -82,9 +82,9 @@ async def show_mnemonic_page(page, page_count, mnemonic): top = pi * 30 + 74 pos = wi + 1 ui.display.text_right( - 40, top, '%d.' % pos, ui.BOLD, ui.LIGHT_GREEN, ui.BLACK) + 15, top, '%d.' % pos, ui.BOLD, ui.LIGHT_GREEN, ui.BLACK) ui.display.text( - 45, top, '%s' % word, ui.BOLD, ui.WHITE, ui.BLACK) + 40, top, '%s' % word, ui.BOLD, ui.WHITE, ui.BLACK) if page + 1 == page_count: await Button( diff --git a/src/apps/playground_chren/__init__.py b/src/apps/playground_chren/__init__.py deleted file mode 100644 index 52e13fec2..000000000 --- a/src/apps/playground_chren/__init__.py +++ /dev/null @@ -1,2 +0,0 @@ -def boot(): - print("chrenova appka") diff --git a/src/apps/playground_chren/layout_loading.py b/src/apps/playground_chren/layout_loading.py deleted file mode 100644 index d43685d2e..000000000 --- a/src/apps/playground_chren/layout_loading.py +++ /dev/null @@ -1,16 +0,0 @@ -from trezor import ui -from trezor import loop -from trezor import res - -def layout_loading(): - - ui.display.text_center(120, 240 - 18, 'Processing ...', ui.BOLD, ui.WHITE, ui.BLACK) - p = 0 - - def func(foreground): - ui.display.loader(p, ui.YELLOW, 0, res.load('apps/playground_chren/res/gears3.toig'), ui.WHITE) - p = (p + 10) % 1000 - - animation = ui.animate_pulse(func, ui.WHITE, ui.GREY, speed=400000) - - yield from animation diff --git a/src/apps/playground_chren/layout_scrollicon.py b/src/apps/playground_chren/layout_scrollicon.py deleted file mode 100644 index da808c36b..000000000 --- a/src/apps/playground_chren/layout_scrollicon.py +++ /dev/null @@ -1,19 +0,0 @@ -from trezor import ui -from trezor import loop - -def layout_scrollicon(): - - def func_top(foreground): - ui.display.bar(102, 214, 36, 4, foreground, ui.BLACK, 2) - - def func_middle(foreground): - ui.display.bar(106, 222, 28, 4, foreground, ui.BLACK, 2) - - def func_bottom(foreground): - ui.display.bar(110, 230, 20, 4, foreground, ui.BLACK, 2) - - animation_top = ui.animate_pulse(func_top, ui.DARK_GREY, ui.LIGHT_GREY, speed=300000, delay=0) - animation_middle = ui.animate_pulse(func_middle, ui.DARK_GREY, ui.LIGHT_GREY, speed=300000, delay=100000) - animation_bottom = ui.animate_pulse(func_bottom, ui.DARK_GREY, ui.LIGHT_GREY, speed=300000, delay=200000) - - yield loop.Wait([animation_top, animation_middle, animation_bottom]) diff --git a/src/apps/playground_chren/layout_send_tx.py b/src/apps/playground_chren/layout_send_tx.py deleted file mode 100644 index 47e0add57..000000000 --- a/src/apps/playground_chren/layout_send_tx.py +++ /dev/null @@ -1,43 +0,0 @@ -from trezor import ui -from trezor import loop -from trezor import res -from trezor.ui.scroll import Scroll - -def layout_send_tx(): - - # paint background black - ui.display.bar(0, 0, 240, 240, ui.BLACK) - - # top header bar - # ui.display.bar(0, 0, 240, 48, ui.PM_BLUE, ui.BLACK, 4) - ui.display.icon(10, 9, res.load('apps/playground_chren/res/arrow-up2.toig'), ui.BLACK, ui.PM_BLUE) - ui.display.text(40, 28, 'Sending coins', ui.BOLD, ui.PM_BLUE, ui.BLACK) - - - # content - ui.display.bar(0, 42, 240, 198, ui.BLACK) - ui.display.text(10, 70, 'Amount:', ui.BOLD, ui.GREY, ui.BLACK) - ui.display.text(10, 100, '0.0000341 BTC', ui.MONO, ui.WHITE, ui.BLACK) - ui.display.text(10, 130, 'To address:', ui.BOLD, ui.GREY, ui.BLACK) - ui.display.text(10, 160, '1NDpZ2wyFekVezssS', ui.MONO, ui.WHITE, ui.BLACK) - ui.display.text(10, 185, 'Xv2tmQgmxcoHMUJ7u', ui.MONO, ui.WHITE, ui.BLACK) - - scroll = Scroll(page=0, totale_lines=20, lines_per_page=4) - scroll.render() - - - # swipe down indicator - def func_top(foreground): - ui.display.bar(102, 214, 36, 4, foreground, ui.BLACK, 2) - - def func_middle(foreground): - ui.display.bar(106, 222, 28, 4, foreground, ui.BLACK, 2) - - def func_bottom(foreground): - ui.display.bar(110, 230, 20, 4, foreground, ui.BLACK, 2) - - animation_top = ui.animate_pulse(func_top, ui.PM_BLUE, ui.PM_DARK_BLUE, speed=300000, delay=0) - animation_middle = ui.animate_pulse(func_middle, ui.PM_BLUE, ui.PM_DARK_BLUE, speed=300000, delay=200000) - animation_bottom = ui.animate_pulse(func_bottom, ui.PM_BLUE, ui.PM_DARK_BLUE, speed=300000, delay=400000) - - yield loop.Wait([animation_top, animation_middle, animation_bottom]) \ No newline at end of file diff --git a/src/apps/playground_chren/res/arrow-up2.toig b/src/apps/playground_chren/res/arrow-up2.toig deleted file mode 100644 index 728049bd3dfa0aea5916c4adfeeac75eda9a4f13..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 189 zcmV;u07Cy%Pf2GM02TnT0002{|NsBr>7kYP|AWAvKn4Z|(eof?BLfIX09oIFvzTOr9@rrvGm^bN&AU r1_s}|w*^3U0v*Amq{sj^J^}1>w)a5hF9RTpc|F+9-z7@!`++n7eppya diff --git a/src/apps/playground_chren/res/gears3.toig b/src/apps/playground_chren/res/gears3.toig deleted file mode 100644 index a291cea9b03ab2158ba7ca6902453fd06067ecb3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1070 zcmV+}1kw9cPf2HB0AK(j1ONc-QcG-1Q5ZgVX8O`frW+)*u1p$1s>6nj8iW#|VvDp& zEF^Sx9zi97kjRvH>}VungEq0TVJZ?4784>?Vp6YoU)oZg-nqv)|9Rd!w|A~JUov<8 zd(L;y`Ty_x5c;=anDh~v9y#-dJU2XA5sqGw#YGcEE$pO2@mny)_fa!>_J!s#RWe!Jw4lqVndgsg;6T$x7V17&Z(CXK%WnXVO+sMo(es(dUmqv^<%AEe@4v|^ zCT=C3M5+kZVV}DDVVWtf^-cEbRZA5A4KkMIpL1pL;3P9=B)=0?5W&u(CM!s(2FZ`d zsJ`|=a0QQ2(c(e;RHZ(RlSZ-2PfPiYl94tn{ey|NoF}kGV$A`wg=~%Q>j$s;u@{?k z{$83k+D{tQLIWKo{MS04Mqtp`V*R3Nv$yNL$)@ynEGEO;6nR;fa?P%WQv4Ww|4oYd zA}c+me6COv`PG1IDKrDWkq|g_NAPVVG1l1yGR+m!srDgc3!O4 zZY2{Ns}JO$J`0Q}dl{Of(KJ6CJ_XFw^sg)#YXD943PMLHva;RB$7ZkK3+d>lC&L^z zLanSCk^E}Np!^i@jsK6yI|n2m)Mav3vAs{5>zi&t^#h6Qbh_j65v(-wpe=1K0z!{U z$&!i>I|b;dTPab&r_7Y_GfIF)o*aq}HrL#&KOc+p2l+A#^Z7zNdf2ZYWPc&7l5o)1tFW6L|)Wub8_f!@{X8Lp=?YL-I$B3X%e}CyYf6f2h7!rJ{oRiYp z@03347L&6M55Gq8yWscw-!K(u$6v z+Sz)e%;u+5u470?H|Bm8R_wvQ)p|8uJBmtB^**s1T1_HjTd#KUjaL}QOZkYbS-OW3 oku@ifKWG%jPlqrt}E=5=nt-tpE1wVFY=OXkU|M6G&1DGZl9smFU diff --git a/src/trezor/ui/scroll.py b/src/trezor/ui/scroll.py index b67f8b6e4..baef2a041 100644 --- a/src/trezor/ui/scroll.py +++ b/src/trezor/ui/scroll.py @@ -24,7 +24,7 @@ async def paginate(render_page, page_count, page=0, *args): async def animate_swipe(): - await ui.animate_pulse(render_swipe_icon, ui.WHITE, ui.GREY, speed=300000, delay=200000) + await ui.animate_pulse(render_swipe_icon, ui.GREY, ui.DARK_GREY, speed=300000, delay=200000) def render_swipe_icon(fg): @@ -47,5 +47,5 @@ def render_scrollbar(page, page_count): for i in range(0, page_count): if i != page: ui.display.bar(x, y + i * padding, size, - size, ui.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)