mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-02-16 17:42:02 +00:00
trezor.ui: remove PM colors and other visuals changes
This commit is contained in:
parent
6861e68f21
commit
36637c23f6
@ -26,7 +26,7 @@ def layout_u2f():
|
||||
ui.display.bar(0, 0, 240, 240, ui.BLACK)
|
||||
|
||||
# top header bar
|
||||
ui.display.text(10, 28, 'U2F Login', ui.BOLD, ui.PM_BLUE, ui.BLACK)
|
||||
ui.display.text(10, 28, 'U2F Login', ui.BOLD, ui.WHITE, ui.BLACK)
|
||||
|
||||
# content
|
||||
ui.display.text_center(120, 70, '%s:' % action, ui.BOLD, ui.GREY, ui.BLACK)
|
||||
|
@ -16,7 +16,10 @@ def rgbcolor(r: int, g: int, b: int) -> int:
|
||||
|
||||
|
||||
LIGHT_RED = rgbcolor(0xFF, 0x00, 0x00)
|
||||
RED = rgbcolor(0x66, 0x00, 0x00)
|
||||
#RED E4572E
|
||||
RED = rgbcolor(0xE4, 0x57, 0x2E)
|
||||
#ACTIVE DARK RED A64022
|
||||
ACTIVE_RED = rgbcolor(0xA6, 0x40, 0x22)
|
||||
PINK = rgbcolor(0xE9, 0x1E, 0x63)
|
||||
PURPLE = rgbcolor(0x9C, 0x27, 0xB0)
|
||||
DEEP_PURPLE = rgbcolor(0x67, 0x3A, 0xB7)
|
||||
@ -25,7 +28,12 @@ BLUE = rgbcolor(0x21, 0x96, 0xF3)
|
||||
LIGHT_BLUE = rgbcolor(0x03, 0xA9, 0xF4)
|
||||
CYAN = rgbcolor(0x00, 0xBC, 0xD4)
|
||||
TEAL = rgbcolor(0x00, 0x96, 0x88)
|
||||
|
||||
#GREEN 4CC148
|
||||
GREEN = rgbcolor(0x4C, 0xC1, 0x48)
|
||||
#ACTIVE DARK GREEN 1A8C14
|
||||
ACTIVE_GREEN = rgbcolor(0x1A, 0x8C, 0x14)
|
||||
|
||||
LIGHT_GREEN = rgbcolor(0x87, 0xCE, 0x26)
|
||||
LIME = rgbcolor(0xCD, 0xDC, 0x39)
|
||||
YELLOW = rgbcolor(0xFF, 0xEB, 0x3B)
|
||||
@ -40,16 +48,12 @@ BLUE_GRAY = rgbcolor(0x60, 0x7D, 0x8B)
|
||||
BLACK = rgbcolor(0x00, 0x00, 0x00)
|
||||
WHITE = rgbcolor(0xFA, 0xFA, 0xFA)
|
||||
|
||||
# custom palette
|
||||
BLACKISH = rgbcolor(0x20, 0x20, 0x20)
|
||||
PM_DARK_BLUE = rgbcolor(0x1A, 0x29, 0x42)
|
||||
PM_BLUE = rgbcolor(0x34, 0x98, 0xDB)
|
||||
|
||||
MONO = Display.FONT_MONO
|
||||
NORMAL = Display.FONT_NORMAL
|
||||
BOLD = Display.FONT_BOLD
|
||||
|
||||
# radius for buttons and other elemts
|
||||
# radius for buttons and other elements
|
||||
BTN_RADIUS = const(2)
|
||||
|
||||
BACKLIGHT_NORMAL = const(60)
|
||||
@ -106,11 +110,11 @@ def animate_pulse(func, ca, cb, speed=200000, delay=30000):
|
||||
yield loop.Sleep(delay)
|
||||
|
||||
|
||||
def header(title, icon=ICON_RESET, fg=BLACK, bg=PM_DARK_BLUE):
|
||||
def header(title, icon=ICON_RESET, fg=BLACK, bg=BLACK):
|
||||
display.bar(0, 0, 240, 32, bg)
|
||||
if icon is not None:
|
||||
display.icon(8, 4, res.load(icon), fg, bg)
|
||||
display.text(8 + 24 + 8, 23, title, BOLD, fg, bg)
|
||||
display.text(8 + 24 + 2, 24, title, BOLD, fg, bg)
|
||||
|
||||
|
||||
def rotate_coords(pos: tuple) -> tuple:
|
||||
|
@ -4,7 +4,7 @@ from . import display, in_area, rotate_coords, Widget
|
||||
|
||||
|
||||
DEFAULT_BUTTON = {
|
||||
'bg-color': ui.BLACKISH,
|
||||
'bg-color': ui.BLACK,
|
||||
'fg-color': ui.WHITE,
|
||||
'text-style': ui.NORMAL,
|
||||
'border-color': ui.BLACK,
|
||||
@ -27,16 +27,16 @@ DEFAULT_BUTTON_DISABLED = {
|
||||
|
||||
CANCEL_BUTTON = {
|
||||
'bg-color': ui.RED,
|
||||
'fg-color': ui.LIGHT_RED,
|
||||
'fg-color': ui.WHITE,
|
||||
'text-style': ui.BOLD,
|
||||
'border-color': ui.RED,
|
||||
'radius': ui.BTN_RADIUS,
|
||||
}
|
||||
CANCEL_BUTTON_ACTIVE = {
|
||||
'bg-color': ui.RED,
|
||||
'bg-color': ui.ACTIVE_RED,
|
||||
'fg-color': ui.WHITE,
|
||||
'text-style': ui.BOLD,
|
||||
'border-color': ui.RED,
|
||||
'border-color': ui.ACTIVE_RED,
|
||||
'radius': ui.BTN_RADIUS,
|
||||
}
|
||||
|
||||
@ -48,10 +48,10 @@ CONFIRM_BUTTON = {
|
||||
'radius': ui.BTN_RADIUS,
|
||||
}
|
||||
CONFIRM_BUTTON_ACTIVE = {
|
||||
'bg-color': ui.GREEN,
|
||||
'bg-color': ui.ACTIVE_GREEN,
|
||||
'fg-color': ui.WHITE,
|
||||
'text-style': ui.BOLD,
|
||||
'border-color': ui.GREEN,
|
||||
'border-color': ui.ACTIVE_GREEN,
|
||||
'radius': ui.BTN_RADIUS,
|
||||
}
|
||||
|
||||
|
@ -11,7 +11,7 @@ DEFAULT_LOADER = {
|
||||
}
|
||||
DEFAULT_LOADER_ACTIVE = {
|
||||
'bg-color': ui.BLACK,
|
||||
'fg-color': ui.LIGHT_GREEN,
|
||||
'fg-color': ui.ACTIVE_GREEN,
|
||||
'icon': None,
|
||||
'icon-fg-color': None,
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user