mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-22 23:48:12 +00:00
minor design changes in colors, pin and white border
This commit is contained in:
parent
4852609efb
commit
9ca6d61bcc
@ -15,7 +15,7 @@
|
||||
#include "display.h"
|
||||
#include <string.h>
|
||||
|
||||
static int BACKLIGHT = 0;
|
||||
static int BACKLIGHT = 255;
|
||||
static int ORIENTATION = 0;
|
||||
|
||||
#if defined STM32_HAL_H
|
||||
|
@ -12,7 +12,8 @@ def rgbcolor(r: int, g: int, b: int) -> int:
|
||||
return ((r & 0xF8) << 8) | ((g & 0xFC) << 3) | ((b & 0xF8) >> 3)
|
||||
|
||||
|
||||
RED = rgbcolor(0xF4, 0x43, 0x36)
|
||||
LIGHT_RED = rgbcolor(0xFF, 0x00, 0x00)
|
||||
RED = rgbcolor(0x66, 0x00, 0x00)
|
||||
PINK = rgbcolor(0xE9, 0x1E, 0x63)
|
||||
PURPLE = rgbcolor(0x9C, 0x27, 0xB0)
|
||||
DEEP_PURPLE = rgbcolor(0x67, 0x3A, 0xB7)
|
||||
@ -21,8 +22,8 @@ BLUE = rgbcolor(0x21, 0x96, 0xF3)
|
||||
LIGHT_BLUE = rgbcolor(0x03, 0xA9, 0xF4)
|
||||
CYAN = rgbcolor(0x00, 0xBC, 0xD4)
|
||||
TEAL = rgbcolor(0x00, 0x96, 0x88)
|
||||
GREEN = rgbcolor(0x4C, 0xAF, 0x50)
|
||||
LIGHT_GREEN = rgbcolor(0x8B, 0xC3, 0x4A)
|
||||
GREEN = rgbcolor(0x44, 0x55, 0x14)
|
||||
LIGHT_GREEN = rgbcolor(0x87, 0xCE, 0x26)
|
||||
LIME = rgbcolor(0xCD, 0xDC, 0x39)
|
||||
YELLOW = rgbcolor(0xFF, 0xEB, 0x3B)
|
||||
AMBER = rgbcolor(0xFF, 0xC1, 0x07)
|
||||
|
@ -16,10 +16,10 @@ DEFAULT_BUTTON_ACTIVE = {
|
||||
}
|
||||
|
||||
CANCEL_BUTTON = {
|
||||
'bg-color': ui.blend(ui.BLACK, ui.RED, 0.3),
|
||||
'fg-color': ui.RED,
|
||||
'text-style': ui.NORMAL,
|
||||
'border-color': ui.blend(ui.BLACK, ui.RED, 0.3),
|
||||
'bg-color': ui.RED,
|
||||
'fg-color': ui.LIGHT_RED,
|
||||
'text-style': ui.BOLD,
|
||||
'border-color': ui.RED,
|
||||
}
|
||||
CANCEL_BUTTON_ACTIVE = {
|
||||
'bg-color': ui.RED,
|
||||
@ -29,10 +29,10 @@ CANCEL_BUTTON_ACTIVE = {
|
||||
}
|
||||
|
||||
CONFIRM_BUTTON = {
|
||||
'bg-color': ui.blend(ui.BLACK, ui.GREEN, 0.3),
|
||||
'fg-color': ui.GREEN,
|
||||
'text-style': ui.NORMAL,
|
||||
'border-color': ui.blend(ui.BLACK, ui.GREEN, 0.3),
|
||||
'bg-color': ui.GREEN,
|
||||
'fg-color': ui.LIGHT_GREEN,
|
||||
'text-style': ui.BOLD,
|
||||
'border-color': ui.GREEN,
|
||||
}
|
||||
CONFIRM_BUTTON_ACTIVE = {
|
||||
'bg-color': ui.GREEN,
|
||||
|
@ -12,10 +12,10 @@ class ConfirmDialog():
|
||||
|
||||
def __init__(self, content=None, confirm='Confirm', cancel='Cancel'):
|
||||
self.content = content
|
||||
self.confirm = Button((0, 240 - 48, 119, 48), confirm,
|
||||
self.confirm = Button((121, 240 - 48, 119, 48), confirm,
|
||||
normal_style=CONFIRM_BUTTON,
|
||||
active_style=CONFIRM_BUTTON_ACTIVE)
|
||||
self.cancel = Button((121, 240 - 48, 119, 48), cancel,
|
||||
self.cancel = Button((0, 240 - 48, 119, 48), cancel,
|
||||
normal_style=CANCEL_BUTTON,
|
||||
active_style=CANCEL_BUTTON_ACTIVE)
|
||||
|
||||
|
@ -30,7 +30,7 @@ class PinMatrix():
|
||||
def render(self):
|
||||
|
||||
# input line with placeholder (x, y, text, style, fg-c, bg-c)
|
||||
display.text_center(120, 20, 'Enter PIN', ui.BOLD, ui.GREY, ui.BLACK)
|
||||
display.text_center(120, 30, 'Enter PIN', ui.BOLD, ui.GREY, ui.BLACK)
|
||||
|
||||
# vertical border bars (x, y, w, h, c)
|
||||
display.bar(79, 48, 2, 143, ui.blend(ui.BLACK, ui.WHITE, 0.25))
|
||||
|
Loading…
Reference in New Issue
Block a user