From e43ce25611224e74c7aa5797b7eccde03c4cfd5a Mon Sep 17 00:00:00 2001 From: Peter Jensen Date: Tue, 27 Feb 2018 23:48:51 +0100 Subject: [PATCH] src/trezor/ui/style: update resources and icons in dialogs --- assets/{cross2.png => cancel.png} | Bin assets/cog.png | Bin 0 -> 1239 bytes assets/cross.png | Bin 1119 -> 0 bytes assets/receive.png | Bin 0 -> 1108 bytes assets/send.png | Bin 1285 -> 1106 bytes assets/wrong.png | Bin 0 -> 1258 bytes src/apps/common/request_passphrase.py | 4 ++-- src/apps/management/apply_settings.py | 8 ++++---- src/apps/management/change_pin.py | 10 ++++----- src/apps/management/reset_device.py | 2 +- src/apps/wallet/get_address.py | 4 ++-- src/apps/wallet/sign_tx/layout.py | 16 +++++++-------- src/trezor/res/{cross2.toig => cancel.toig} | Bin src/trezor/res/clear.toig | Bin 168 -> 0 bytes src/trezor/res/confirm.toig | Bin 142 -> 89 bytes src/trezor/res/confirm2.toig | Bin 89 -> 0 bytes src/trezor/res/header_icons/cog.toig | Bin 0 -> 152 bytes src/trezor/res/{ => header_icons}/nocopy.toig | Bin src/trezor/res/header_icons/receive.toig | Bin 0 -> 109 bytes src/trezor/res/header_icons/recovery.toig | Bin 95 -> 147 bytes src/trezor/res/header_icons/send.toig | Bin 0 -> 104 bytes src/trezor/res/header_icons/wrong.toig | Bin 0 -> 182 bytes src/trezor/res/send.toig | Bin 164 -> 0 bytes src/trezor/res/send2.toig | Bin 108 -> 0 bytes src/trezor/res/{swipedown.toig => swipe.toig} | Bin src/trezor/ui/__init__.py | 2 +- src/trezor/ui/confirm.py | 2 +- src/trezor/ui/style.py | 19 +++++++++++------- 28 files changed, 36 insertions(+), 31 deletions(-) rename assets/{cross2.png => cancel.png} (100%) create mode 100644 assets/cog.png delete mode 100644 assets/cross.png create mode 100644 assets/receive.png create mode 100644 assets/wrong.png rename src/trezor/res/{cross2.toig => cancel.toig} (100%) delete mode 100644 src/trezor/res/clear.toig delete mode 100644 src/trezor/res/confirm2.toig create mode 100644 src/trezor/res/header_icons/cog.toig rename src/trezor/res/{ => header_icons}/nocopy.toig (100%) create mode 100644 src/trezor/res/header_icons/receive.toig create mode 100644 src/trezor/res/header_icons/send.toig create mode 100644 src/trezor/res/header_icons/wrong.toig delete mode 100644 src/trezor/res/send.toig delete mode 100644 src/trezor/res/send2.toig rename src/trezor/res/{swipedown.toig => swipe.toig} (100%) diff --git a/assets/cross2.png b/assets/cancel.png similarity index 100% rename from assets/cross2.png rename to assets/cancel.png diff --git a/assets/cog.png b/assets/cog.png new file mode 100644 index 0000000000000000000000000000000000000000..8c59f6860599f99ab22d3afbfbc8a23defac3160 GIT binary patch literal 1239 zcmV;|1StE7P)U8P*7-ZbZ>KLZ*U+lnSp_Ufq@}0xwybFAi#%#fq@|}KQEO56)-X|e7nZL z$iTqBa9P*U#mSX{G{Bl%P*lRez;J+pfx##xwK$o9f#C}S14DXwNkIt%17i#W1A|CX zc0maP17iUL1A|C*NRTrF17iyV0~1e4YDEbH0|SF|enDkXW_m`6f}y3QrGjHhep0GJ zaAk2xYHqQDXI^rCQ9*uDVo7QW0|Nup4h9AW240u^5(W3f%sd4n162kpgNVo|1qcff zJ_s=cNG>fZg9jx8g8+j9g8_pBLjXe}Lp{R+hNBE`7{wV~7)u#fFy3PlV+vxLz;uCG zm^qSpA@ds+OO_6nTdaDlt*rOhEZL^9ePa)2-_4=K(Z%tFGm-NGmm}8}ZcXk5JW@PU zd4+f<@d@)yL(o<5icqT158+-B6_LH7;i6x}CW#w~Uy-Pgl#@Irl`kzV zeL|*8R$ca%T%Wv){2zs_iiJvgN^h0dsuZZ2sQy$tsNSU!s;Q*;LF<6_B%M@UD?LHI zSNcZ`78uqV#TeU~$eS{ozBIdFzSClfs*^S+dw;4dus<{M;#|MXC)T}S9v!D zcV!QCPhBq)ZyO(X-(bH4|NMaZz==UigLj2o41F2S6d@OB6%`R(5i>J(Puzn9wnW{e zu;hl6HK{k#IWjCVGqdJqU(99Cv(K+6*i`tgSi2;vbX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%01W^SH2RkDT>t<8AY({UO#lFTB>(_`g8%^e z{{R4h=>PzAFaQARU;qF*m;eA5Z<1fdMgRZ+wn;=mRCwBAU?2cEWt9~a6ciNYxzHqR zuYGv_{Q2|u4}H-jT;Koy|NsC0|G&f0B%IzrB)*3XCJFo35Q%RAa3N+nd1-0xuy;@$ zsoc`ia*C`B3=FI#?_WH5_~tJ};{V%+Po95lPP-Ow>HmTN0000ERLtq$NO@14u9&l}S?BsF==N&#=YQ#WAGfR#Jij zQ^BTW@#k?St+Km+{Qo~WV&ja>Fa868y3yk9&ANX;%>Vy?Upx}I;L!^sj*me0gtL(! z{@a^L`iX#ekqVCvo&LADG1GERLtq=i7314uBkEP5!rQ8Aslo-y6i#WAGfR#Kus z)$v2$%al(q-^>V9!SMfoQer~FPx%vvPQbVie($*5+xk$rS(+K9;K7fBhdwmUpZIk3 z=XL*e?kvjb(c#(u-4LcDAwi&`kZyH%`_o z9QrUnQIOd|hX)8Y^-D@fL`X@U?B323`Z-#X>4q2D&j^41~r*;zCJ&1%OP#R@Ub!`|8Bw+PEg=@y85}Sb4q9e E0Fzj}R{#J2 diff --git a/assets/wrong.png b/assets/wrong.png new file mode 100644 index 0000000000000000000000000000000000000000..2a1061cd84c29f2ad3cbbe0a7e342d4eed9f5980 GIT binary patch literal 1258 zcmVU8P*7-ZbZ>KLZ*U+lnSp_Ufq@}0xwybFAi#%#fq@|}KQEO56)-X|e7nZL z$iTqBa9P*U#mSX{G{Bl%P*lRez;J+pfx##xwK$o9f#C}S14DXwNkIt%17i#W1A|CX zc0maP17iUL1A|C*NRTrF17iyV0~1e4YDEbH0|SF|enDkXW_m`6f}y3QrGjHhep0GJ zaAk2xYHqQDXI^rCQ9*uDVo7QW0|Nup4h9AW240u^5(W3f%sd4n162kpgNVo|1qcff zJ_s=cNG>fZg9jx8g8+j9g8_pBLjXe}Lp{R+hNBE`7{wV~7)u#fFy3PlV+vxLz;uCG zm^qSpA@ds+OO_6nTdaDlt*rOhEZL^9ePa)2-_4=K(Z%tFGm-NGmm}8}ZcXk5JW@PU zd4+f<@d@)yL(o<5icqT158+-B6_LH7;i6x}CW#w~Uy-Pgl#@Irl`kzV zeL|*8R$ca%T%Wv){2zs_iiJvgN^h0dsuZZ2sQy$tsNSU!s;Q*;LF<6_B%M@UD?LHI zSNcZ`78uqV#TeU~$eS{ozBIdFzSClfs*^S+dw;4dus<{M;#|MXC)T}S9v!D zcV!QCPhBq)ZyO(X-(bH4|NMaZz==UigLj2o41F2S6d@OB6%`R(5i>J(Puzn9wnW{e zu;hl6HK{k#IWjCVGqdJqU(99Cv(K+6*i`tgSi2;vbXD1#3jNBGs$DgVwO(~o>mN4i zHPtkqZIx>)Y(Ls5-Br|mx>vQYvH$Kwn@O`L|D75??eGkZnfg$5<;Xeg_o%+-I&+-3%01W^SH2RkDT>t<8AY({UO#lFTB>(_`g8%^e z{{R4h=>PzAFaQARU;qF*m;eA5Z<1fdMgRZ-Oi4sRRCwB)lD|vUVHAg-*R}{1(Fg>E z#9zrZu2(H^Y;cPR0$0Jsv9YEQhumC*AQKDqs`=HrUG!f6h!D}i$sv#kK@kl_^Kp3Z z)n?E5Ja9gTa}M05D&Hi}A%qY@fd2WnRgu>W{yhAai3UUjZx7e7?ZrJyZQwfG8vitfCsA1m)oME>+nX{?S!b$@E|k7_<$ z!T}!TysknTLKFegUw%itKid-t5JG_JPf^U)mOxqDjk!)${V$;X!>=gzCQ~=9pfP(B zo-~)k;o-FE(el>=)oe?7yX}jr&ONC6tm;Z<= 18 * 5: data = data[:(18 * 5 - 3)] + '...' - content = Text('OP_RETURN', ui.ICON_DEFAULT, - ui.MONO, *split_op_return(data)) + content = Text('OP_RETURN', ui.ICON_SEND, + ui.MONO, *split_op_return(data), icon_color=ui.GREEN) else: address = output.address - content = Text('Confirm sending', ui.ICON_DEFAULT, + content = Text('Confirm sending', ui.ICON_SEND, ui.NORMAL, format_coin_amount(output.amount, coin) + ' to', - ui.MONO, *split_address(address)) + ui.MONO, *split_address(address), icon_color=ui.GREEN) return await confirm(ctx, content, ButtonRequestType.ConfirmOutput) async def confirm_total(ctx, spending, fee, coin): - content = Text('Confirm transaction', ui.ICON_DEFAULT, + content = Text('Confirm transaction', ui.ICON_SEND, 'Total amount:', ui.BOLD, format_coin_amount(spending, coin), ui.NORMAL, 'including fee:', - ui.BOLD, format_coin_amount(fee, coin)) + ui.BOLD, format_coin_amount(fee, coin), icon_color=ui.GREEN) return await hold_to_confirm(ctx, content, ButtonRequestType.SignTx) async def confirm_feeoverthreshold(ctx, fee, coin): - content = Text('High fee', ui.ICON_DEFAULT, + content = Text('High fee', ui.ICON_SEND, 'The fee of', ui.BOLD, format_coin_amount(fee, coin), ui.NORMAL, 'is unexpectedly high.', - 'Continue?') + 'Continue?', icon_color=ui.GREEN) return await confirm(ctx, content, ButtonRequestType.FeeOverThreshold) diff --git a/src/trezor/res/cross2.toig b/src/trezor/res/cancel.toig similarity index 100% rename from src/trezor/res/cross2.toig rename to src/trezor/res/cancel.toig diff --git a/src/trezor/res/clear.toig b/src/trezor/res/clear.toig deleted file mode 100644 index e8914f062b7a751938f87e514f146c0a7e70ae49..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 168 zcmV;Z09XH1Pf2GU02Tn80000@&#?`{Fc1aMUnNFRc!Vs#OpL$?VS_+J%?8N^kyyY& zqN8F2s8AC4*mrU4EADi9_W2B~4$vr0A-Ch)Hebo?q%)jCSyQ>;O=>S}__I(Re6IPN zXY{j`Tg&hm#vkr-d}Lgb*7>&=eEZ=;!b(?@*n7mng&^Q~ W3}q)6_@fI~ddV^5?KOVv4*UV_ZcZQo diff --git a/src/trezor/res/confirm.toig b/src/trezor/res/confirm.toig index fdd2c5d6e315b9f0781897f7c99eea6978c627dc..cae04d25be24cce3973b5cab4ff1900966ab21a7 100644 GIT binary patch literal 89 zcmV-f0H*&`Pf2GG01yC80000JU;qO~2*m=S7}ghnDUSa?!Sww9zaiZJ6Bq(P+@B1r ve;C+7-2VR?>i_>@VA%iv-~ay$z-mBTkRlKlB=8Gj=KKW^niWh6Ki_>@VA%iv-~ay$z-mBTkRlKlB=8Gj=KKW^niWh6K2a#X;fy7S+hWSA12M0)!fdND{FaQ+^ zFo2Bs!oa}y{}0HT^Zy^9vXRuVgEc|)BAbb97qT0W-3D{>CZL-UesMtcBa+{Nb~5ln G!vp{YdPpw- literal 0 HcmV?d00001 diff --git a/src/trezor/res/nocopy.toig b/src/trezor/res/header_icons/nocopy.toig similarity index 100% rename from src/trezor/res/nocopy.toig rename to src/trezor/res/header_icons/nocopy.toig diff --git a/src/trezor/res/header_icons/receive.toig b/src/trezor/res/header_icons/receive.toig new file mode 100644 index 0000000000000000000000000000000000000000..0dbc5b7c784b8c9821b69c901b921d171969565d GIT binary patch literal 109 zcmV-z0FwVyPf2GO02lya0001EU_b>zN=k}QCiDGw@7_5;*evh=|NkFAT{bhEEhxwe zVkZa+F)-A4ytLB^E$E&<_^|8?^xL P$@#w!9_C!YfDZrw>UJvq literal 0 HcmV?d00001 diff --git a/src/trezor/res/header_icons/recovery.toig b/src/trezor/res/header_icons/recovery.toig index 72f1c904f5df50416dc8c13f3988a063e3844556..1380e8664ef7827bdacf73520d449e2e38f05015 100644 GIT binary patch literal 147 zcmV;E0BrwMPf2GI01^O)0001EU|?W0R$yRYXJBAE|Nn0x<9r6@^Z)<<|CjTh!T$fh zUH5@(#`pgM7+8P|j{lDs7^Hv{}UMU|NknR_x~5r^8X+(0VuBpq_==Iip&lIk^n_G BNS^=z literal 95 zcmV-l0HFU=Pf2GO02lyM0001EU_b%v?|@(egw6RM2o^xt9JFLJ3JOYs*b4;(1=#+* zdkoCLq}BeFP+|fnP{4ozEd6rc|NmeUn1B*cVFm`P_y7O@ zTMV&`asL1RzXYH*1KB^JOihrQNf0ILL3%-!gU$T44s1EdCI1&nK_t9DW`itW!oaW| kY^65XZM|SCftKF{`sF^@CDwlnfkt)*fY_`%1aO7|04KsxMgRZ+ literal 0 HcmV?d00001 diff --git a/src/trezor/res/send.toig b/src/trezor/res/send.toig deleted file mode 100644 index 5edd9ec9cfc81caf5f4f8231e7a63259eb130712..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 164 zcmV;V09*f5Pf2G$06+kk0001EU>F6XVCVq>{L|9=8LdB6YvAL7^k{{VjN z{|xYG|NsC069U>D@Y_DLv@^Bg*KYfNBVOD0|NpIkM?2&B|Nl4PbA0}Pr~x<}&jE~( zjrjcD4>UjkkKaKC9K;uNKm+~=;0Zdg0d{yo9%R6MJRuJ<0B^+g|Hq%|IPhx+8-Op~ S8QAe_XJCll%rFWD8vp=fbWiO7 diff --git a/src/trezor/res/send2.toig b/src/trezor/res/send2.toig deleted file mode 100644 index 6a75b310c929f30eb7a23bf0494f76c9170c2c34..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 108 zcmV-y0F(bzPf2GI01^OT0001EU|?VnWPkw1Y6A#E{QqVMqyGPIun_zI{}7>iAOj@C z_8!Rizlnh{@Bf+qzwiGxVEzBo^8eSk{~KBEFXa6Hh4p