mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-29 19:08:12 +00:00
trezor/ui/style: add BG/FG styles
This commit is contained in:
parent
df995eae49
commit
2c73a3f0a8
@ -6,12 +6,12 @@ from trezor.ui import NORMAL, BOLD, MONO
|
|||||||
RADIUS = const(2)
|
RADIUS = const(2)
|
||||||
|
|
||||||
# backlight brightness
|
# backlight brightness
|
||||||
BACKLIGHT_NORMAL = const(60)
|
BACKLIGHT_NORMAL = const(150)
|
||||||
BACKLIGHT_DIM = const(5)
|
BACKLIGHT_DIM = const(5)
|
||||||
BACKLIGHT_NONE = const(2)
|
BACKLIGHT_NONE = const(2)
|
||||||
BACKLIGHT_MAX = const(255)
|
BACKLIGHT_MAX = const(255)
|
||||||
|
|
||||||
# colors
|
# color palette
|
||||||
LIGHT_RED = rgb(0xFF, 0x00, 0x00)
|
LIGHT_RED = rgb(0xFF, 0x00, 0x00)
|
||||||
RED = rgb(0xE4, 0x57, 0x2E) # RED E4572E
|
RED = rgb(0xE4, 0x57, 0x2E) # RED E4572E
|
||||||
ACTIVE_RED = rgb(0xA6, 0x40, 0x22) # ACTIVE DARK RED A64022
|
ACTIVE_RED = rgb(0xA6, 0x40, 0x22) # ACTIVE DARK RED A64022
|
||||||
@ -40,6 +40,10 @@ BLACK = rgb(0x00, 0x00, 0x00)
|
|||||||
WHITE = rgb(0xFA, 0xFA, 0xFA)
|
WHITE = rgb(0xFA, 0xFA, 0xFA)
|
||||||
BLACKISH = rgb(0x20, 0x20, 0x20)
|
BLACKISH = rgb(0x20, 0x20, 0x20)
|
||||||
|
|
||||||
|
# common color styles
|
||||||
|
BG = BLACK
|
||||||
|
FG = WHITE
|
||||||
|
|
||||||
# icons
|
# icons
|
||||||
ICON_RESET = 'trezor/res/header_icons/reset.toig'
|
ICON_RESET = 'trezor/res/header_icons/reset.toig'
|
||||||
ICON_WIPE = 'trezor/res/header_icons/wipe.toig'
|
ICON_WIPE = 'trezor/res/header_icons/wipe.toig'
|
||||||
@ -47,90 +51,90 @@ ICON_RECOVERY = 'trezor/res/header_icons/recovery.toig'
|
|||||||
|
|
||||||
# buttons
|
# buttons
|
||||||
BTN_DEFAULT = {
|
BTN_DEFAULT = {
|
||||||
'bg-color': BLACK,
|
'bg-color': BG,
|
||||||
'fg-color': WHITE,
|
'fg-color': FG,
|
||||||
'text-style': NORMAL,
|
'text-style': NORMAL,
|
||||||
'border-color': BLACK,
|
'border-color': BG,
|
||||||
'radius': RADIUS,
|
'radius': RADIUS,
|
||||||
}
|
}
|
||||||
BTN_DEFAULT_ACTIVE = {
|
BTN_DEFAULT_ACTIVE = {
|
||||||
'bg-color': GREY,
|
'bg-color': GREY,
|
||||||
'fg-color': BLACK,
|
'fg-color': BG,
|
||||||
'text-style': BOLD,
|
'text-style': BOLD,
|
||||||
'border-color': GREY,
|
'border-color': GREY,
|
||||||
'radius': RADIUS,
|
'radius': RADIUS,
|
||||||
}
|
}
|
||||||
BTN_DEFAULT_DISABLED = {
|
BTN_DEFAULT_DISABLED = {
|
||||||
'bg-color': BLACK,
|
'bg-color': BG,
|
||||||
'fg-color': GREY,
|
'fg-color': GREY,
|
||||||
'text-style': NORMAL,
|
'text-style': NORMAL,
|
||||||
'border-color': BLACK,
|
'border-color': BG,
|
||||||
'radius': RADIUS,
|
'radius': RADIUS,
|
||||||
}
|
}
|
||||||
BTN_CANCEL = {
|
BTN_CANCEL = {
|
||||||
'bg-color': RED,
|
'bg-color': RED,
|
||||||
'fg-color': WHITE,
|
'fg-color': FG,
|
||||||
'text-style': BOLD,
|
'text-style': BOLD,
|
||||||
'border-color': RED,
|
'border-color': RED,
|
||||||
'radius': RADIUS,
|
'radius': RADIUS,
|
||||||
}
|
}
|
||||||
BTN_CANCEL_ACTIVE = {
|
BTN_CANCEL_ACTIVE = {
|
||||||
'bg-color': ACTIVE_RED,
|
'bg-color': ACTIVE_RED,
|
||||||
'fg-color': WHITE,
|
'fg-color': FG,
|
||||||
'text-style': BOLD,
|
'text-style': BOLD,
|
||||||
'border-color': ACTIVE_RED,
|
'border-color': ACTIVE_RED,
|
||||||
'radius': RADIUS,
|
'radius': RADIUS,
|
||||||
}
|
}
|
||||||
BTN_CONFIRM = {
|
BTN_CONFIRM = {
|
||||||
'bg-color': GREEN,
|
'bg-color': GREEN,
|
||||||
'fg-color': WHITE,
|
'fg-color': FG,
|
||||||
'text-style': BOLD,
|
'text-style': BOLD,
|
||||||
'border-color': GREEN,
|
'border-color': GREEN,
|
||||||
'radius': RADIUS,
|
'radius': RADIUS,
|
||||||
}
|
}
|
||||||
BTN_CONFIRM_ACTIVE = {
|
BTN_CONFIRM_ACTIVE = {
|
||||||
'bg-color': ACTIVE_GREEN,
|
'bg-color': ACTIVE_GREEN,
|
||||||
'fg-color': WHITE,
|
'fg-color': FG,
|
||||||
'text-style': BOLD,
|
'text-style': BOLD,
|
||||||
'border-color': ACTIVE_GREEN,
|
'border-color': ACTIVE_GREEN,
|
||||||
'radius': RADIUS,
|
'radius': RADIUS,
|
||||||
}
|
}
|
||||||
BTN_CLEAR = {
|
BTN_CLEAR = {
|
||||||
'bg-color': BLACK,
|
'bg-color': BG,
|
||||||
'fg-color': WHITE,
|
'fg-color': FG,
|
||||||
'text-style': NORMAL,
|
'text-style': NORMAL,
|
||||||
'border-color': BLACK,
|
'border-color': BG,
|
||||||
'radius': RADIUS,
|
'radius': RADIUS,
|
||||||
}
|
}
|
||||||
BTN_CLEAR_ACTIVE = {
|
BTN_CLEAR_ACTIVE = {
|
||||||
'bg-color': BLACK,
|
'bg-color': BG,
|
||||||
'fg-color': GREY,
|
'fg-color': GREY,
|
||||||
'text-style': NORMAL,
|
'text-style': NORMAL,
|
||||||
'border-color': BLACK,
|
'border-color': BG,
|
||||||
'radius': RADIUS,
|
'radius': RADIUS,
|
||||||
}
|
}
|
||||||
BTN_KEY = {
|
BTN_KEY = {
|
||||||
'bg-color': BLACKISH,
|
'bg-color': BLACKISH,
|
||||||
'fg-color': WHITE,
|
'fg-color': FG,
|
||||||
'text-style': MONO,
|
'text-style': MONO,
|
||||||
'border-color': BLACK,
|
'border-color': BG,
|
||||||
}
|
}
|
||||||
BTN_KEY_ACTIVE = {
|
BTN_KEY_ACTIVE = {
|
||||||
'bg-color': GREY,
|
'bg-color': GREY,
|
||||||
'fg-color': BLACK,
|
'fg-color': BG,
|
||||||
'text-style': MONO,
|
'text-style': MONO,
|
||||||
'border-color': GREY,
|
'border-color': GREY,
|
||||||
}
|
}
|
||||||
|
|
||||||
# loader
|
# loader
|
||||||
LDR_DEFAULT = {
|
LDR_DEFAULT = {
|
||||||
'bg-color': BLACK,
|
'bg-color': BG,
|
||||||
'fg-color': WHITE,
|
'fg-color': FG,
|
||||||
'icon': None,
|
'icon': None,
|
||||||
'icon-fg-color': None,
|
'icon-fg-color': None,
|
||||||
}
|
}
|
||||||
LDR_DEFAULT_ACTIVE = {
|
LDR_DEFAULT_ACTIVE = {
|
||||||
'bg-color': BLACK,
|
'bg-color': BG,
|
||||||
'fg-color': ACTIVE_GREEN,
|
'fg-color': ACTIVE_GREEN,
|
||||||
'icon': None,
|
'icon': None,
|
||||||
'icon-fg-color': None,
|
'icon-fg-color': None,
|
||||||
|
Loading…
Reference in New Issue
Block a user