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 0000000000..8c59f68605 Binary files /dev/null and b/assets/cog.png differ diff --git a/assets/cross.png b/assets/cross.png deleted file mode 100644 index 3e6f707442..0000000000 Binary files a/assets/cross.png and /dev/null differ diff --git a/assets/receive.png b/assets/receive.png new file mode 100644 index 0000000000..f398b35db6 Binary files /dev/null and b/assets/receive.png differ diff --git a/assets/send.png b/assets/send.png index d3aa9cfbcc..a73d54125b 100644 Binary files a/assets/send.png and b/assets/send.png differ diff --git a/assets/wrong.png b/assets/wrong.png new file mode 100644 index 0000000000..2a1061cd84 Binary files /dev/null and b/assets/wrong.png differ diff --git a/src/apps/common/request_passphrase.py b/src/apps/common/request_passphrase.py index ab71bcf4a1..73aba9f686 100644 --- a/src/apps/common/request_passphrase.py +++ b/src/apps/common/request_passphrase.py @@ -13,7 +13,7 @@ from apps.common.cache import get_state @ui.layout async def request_passphrase_entry(ctx): text = Text( - 'Enter passphrase', ui.ICON_DEFAULT, + 'Enter passphrase', ui.ICON_CONFIG, 'Where to enter your', 'passphrase?') text.render() @@ -31,7 +31,7 @@ async def request_passphrase_entry(ctx): async def request_passphrase_ack(ctx, on_device): if not on_device: text = Text( - 'Passphrase entry', ui.ICON_DEFAULT, + 'Passphrase entry', ui.ICON_CONFIG, 'Please, type passphrase', 'on connected host.') text.render() diff --git a/src/apps/management/apply_settings.py b/src/apps/management/apply_settings.py index 81104d0b05..2daac96e2b 100644 --- a/src/apps/management/apply_settings.py +++ b/src/apps/management/apply_settings.py @@ -12,20 +12,20 @@ async def apply_settings(ctx, msg): if msg.homescreen is not None: await require_confirm(ctx, Text( - 'Change homescreen', ui.ICON_DEFAULT, + 'Change homescreen', ui.ICON_CONFIG, 'Do you really want to', 'change homescreen?'), code=ButtonRequestType.ProtectCall) if msg.label is not None: await require_confirm(ctx, Text( - 'Change label', ui.ICON_DEFAULT, + 'Change label', ui.ICON_CONFIG, 'Do you really want to', 'change label to', ui.BOLD, '%s?' % msg.label), # TODO: split label (bold) and '?' (normal) once we support mixed styles on one line code=ButtonRequestType.ProtectCall) if msg.language is not None: await require_confirm(ctx, Text( - 'Change language', ui.ICON_DEFAULT, + 'Change language', ui.ICON_CONFIG, 'Do you really want to', 'change language to', ui.BOLD, '%s?' % msg.language), # TODO: split lang (bold) and '?' (normal) once we support mixed styles on one line code=ButtonRequestType.ProtectCall) @@ -33,7 +33,7 @@ async def apply_settings(ctx, msg): if msg.use_passphrase is not None: await require_confirm(ctx, Text( 'Enable passphrase' if msg.use_passphrase else 'Disable passphrase', - ui.ICON_DEFAULT, + ui.ICON_CONFIG, 'Do you really want to', 'enable passphrase' if msg.use_passphrase else 'disable passphrase', 'encryption?'), diff --git a/src/apps/management/change_pin.py b/src/apps/management/change_pin.py index 4aa485f464..84b978e6b3 100644 --- a/src/apps/management/change_pin.py +++ b/src/apps/management/change_pin.py @@ -45,19 +45,19 @@ def confirm_change_pin(ctx, msg): if msg.remove and has_pin: # removing pin return require_confirm(ctx, Text( - 'Remove PIN', ui.ICON_DEFAULT, + 'Remove PIN', ui.ICON_CONFIG, 'Do you really want to', ui.BOLD, 'remove current PIN?')) if not msg.remove and has_pin: # changing pin return require_confirm(ctx, Text( - 'Change PIN', ui.ICON_DEFAULT, + 'Change PIN', ui.ICON_CONFIG, 'Do you really want to', ui.BOLD, 'change current PIN?')) if not msg.remove and not has_pin: # setting new pin return require_confirm(ctx, Text( - 'Change PIN', ui.ICON_DEFAULT, + 'Change PIN', ui.ICON_CONFIG, 'Do you really want to', ui.BOLD, 'set new PIN?')) @@ -85,10 +85,10 @@ async def request_pin_confirm(ctx, *args, **kwargs): @ui.layout async def pin_mismatch(): text = Text( - 'PIN mismatch', ui.ICON_DEFAULT, + 'PIN mismatch', ui.ICON_WRONG, 'Entered PINs do not', 'match each other.', '', - 'Please, try again...') + 'Please, try again...', icon_color=ui.RED) text.render() await loop.sleep(3 * 1000 * 1000) diff --git a/src/apps/management/reset_device.py b/src/apps/management/reset_device.py index 404032ff7b..2bebb71155 100644 --- a/src/apps/management/reset_device.py +++ b/src/apps/management/reset_device.py @@ -111,7 +111,7 @@ async def show_warning(ctx): async def show_wrong_entry(ctx): content = Text( - 'Wrong entry!', ui.ICON_CLEAR, + 'Wrong entry!', ui.ICON_WRONG, 'You have entered', 'wrong seed word.', 'Please check again.', icon_color=ui.RED) diff --git a/src/apps/wallet/get_address.py b/src/apps/wallet/get_address.py index b999b924ec..e185347a68 100644 --- a/src/apps/wallet/get_address.py +++ b/src/apps/wallet/get_address.py @@ -30,7 +30,7 @@ async def get_address(ctx, msg): async def _show_address(ctx, address: str): lines = _split_address(address) - content = Text('Confirm address', ui.ICON_DEFAULT, ui.MONO, *lines) + content = Text('Confirm address', ui.ICON_RECEIVE, ui.MONO, *lines, icon_color=ui.GREEN) return await confirm( ctx, content, @@ -49,7 +49,7 @@ async def _show_qr(ctx, address: str, script_type: int): content = Container( Qr(address, (qr_x, qr_y), qr_coef), - Text('Confirm address', ui.ICON_DEFAULT, ui.MONO)) + Text('Confirm address', ui.ICON_RECEIVE, ui.MONO, icon_color=ui.GREEN)) return await confirm( ctx, content, diff --git a/src/apps/wallet/sign_tx/layout.py b/src/apps/wallet/sign_tx/layout.py index 11e08865d9..324a6b0c47 100644 --- a/src/apps/wallet/sign_tx/layout.py +++ b/src/apps/wallet/sign_tx/layout.py @@ -25,30 +25,30 @@ async def confirm_output(ctx, output, coin): data = hexlify(output.op_return_data).decode() if len(data) >= 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 e8914f062b..0000000000 Binary files a/src/trezor/res/clear.toig and /dev/null differ diff --git a/src/trezor/res/confirm.toig b/src/trezor/res/confirm.toig index fdd2c5d6e3..cae04d25be 100644 Binary files a/src/trezor/res/confirm.toig and b/src/trezor/res/confirm.toig differ diff --git a/src/trezor/res/confirm2.toig b/src/trezor/res/confirm2.toig deleted file mode 100644 index cae04d25be..0000000000 Binary files a/src/trezor/res/confirm2.toig and /dev/null differ diff --git a/src/trezor/res/header_icons/cog.toig b/src/trezor/res/header_icons/cog.toig new file mode 100644 index 0000000000..317f463c22 Binary files /dev/null and b/src/trezor/res/header_icons/cog.toig differ 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 0000000000..0dbc5b7c78 Binary files /dev/null and b/src/trezor/res/header_icons/receive.toig differ diff --git a/src/trezor/res/header_icons/recovery.toig b/src/trezor/res/header_icons/recovery.toig index 72f1c904f5..1380e8664e 100644 Binary files a/src/trezor/res/header_icons/recovery.toig and b/src/trezor/res/header_icons/recovery.toig differ diff --git a/src/trezor/res/header_icons/send.toig b/src/trezor/res/header_icons/send.toig new file mode 100644 index 0000000000..93743ba063 Binary files /dev/null and b/src/trezor/res/header_icons/send.toig differ diff --git a/src/trezor/res/header_icons/wrong.toig b/src/trezor/res/header_icons/wrong.toig new file mode 100644 index 0000000000..96f9ebd6a6 Binary files /dev/null and b/src/trezor/res/header_icons/wrong.toig differ diff --git a/src/trezor/res/send.toig b/src/trezor/res/send.toig deleted file mode 100644 index 5edd9ec9cf..0000000000 Binary files a/src/trezor/res/send.toig and /dev/null differ diff --git a/src/trezor/res/send2.toig b/src/trezor/res/send2.toig deleted file mode 100644 index 6a75b310c9..0000000000 Binary files a/src/trezor/res/send2.toig and /dev/null differ diff --git a/src/trezor/res/swipedown.toig b/src/trezor/res/swipe.toig similarity index 100% rename from src/trezor/res/swipedown.toig rename to src/trezor/res/swipe.toig diff --git a/src/trezor/ui/__init__.py b/src/trezor/ui/__init__.py index 189df04971..d3398dc9b4 100644 --- a/src/trezor/ui/__init__.py +++ b/src/trezor/ui/__init__.py @@ -128,7 +128,7 @@ def header(title: str, bg: int=BG, ifg: int=BG): if icon is not None: - display.icon(14, 17, res.load(icon), ifg, bg) + display.icon(14, 15, res.load(icon), ifg, bg) display.text(44, 35, title, BOLD, fg, bg) diff --git a/src/trezor/ui/confirm.py b/src/trezor/ui/confirm.py index 7f9e038ec5..10ac57f9df 100644 --- a/src/trezor/ui/confirm.py +++ b/src/trezor/ui/confirm.py @@ -7,7 +7,7 @@ from trezor.ui.loader import Loader CONFIRMED = const(1) CANCELLED = const(2) DEFAULT_CONFIRM = res.load(ui.ICON_CONFIRM) -DEFAULT_CANCEL = res.load(ui.ICON_CLEAR) +DEFAULT_CANCEL = res.load(ui.ICON_CANCEL) class ConfirmDialog(Widget): diff --git a/src/trezor/ui/style.py b/src/trezor/ui/style.py index f810e40e2e..7342ecc161 100644 --- a/src/trezor/ui/style.py +++ b/src/trezor/ui/style.py @@ -45,18 +45,23 @@ BG = BLACK FG = WHITE # icons -ICON_DEFAULT = 'trezor/res/header_icons/reset.toig' ICON_RESET = 'trezor/res/header_icons/reset.toig' ICON_WIPE = 'trezor/res/header_icons/wipe.toig' -ICON_RECOVERY = 'trezor/res/recovery.toig' -ICON_CLEAR = 'trezor/res/cross2.toig' -ICON_CONFIRM = 'trezor/res/confirm2.toig' -ICON_CONFIRM2 = 'trezor/res/confirm.toig' +ICON_RECOVERY = 'trezor/res/header_icons/recovery.toig' +ICON_NOCOPY = 'trezor/res/header_icons/nocopy.toig' +ICON_WRONG = 'trezor/res/header_icons/wrong.toig' +ICON_CONFIG = 'trezor/res/header_icons/cog.toig' +ICON_RECEIVE = 'trezor/res/header_icons/receive.toig' +ICON_SEND = 'trezor/res/header_icons/send.toig' + +ICON_DEFAULT = ICON_CONFIG + +ICON_CANCEL = 'trezor/res/cancel.toig' +ICON_CONFIRM = 'trezor/res/confirm.toig' ICON_LOCK = 'trezor/res/lock.toig' ICON_CLICK = 'trezor/res/click.toig' ICON_BACK = 'trezor/res/left.toig' -ICON_NOCOPY = 'trezor/res/nocopy.toig' -ICON_SWIPE = 'trezor/res/swipedown.toig' +ICON_SWIPE = 'trezor/res/swipe.toig' ICON_CHECK = 'trezor/res/check.toig' ICON_SPACE = 'trezor/res/space.toig'