mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-22 23:48:12 +00:00
modtrezorui: introduce TREZOR_FONT_PREFILL, set it to 0 in bootloader
This commit is contained in:
parent
424115967f
commit
94588dd588
@ -34,6 +34,7 @@ SOURCE_MOD += [
|
||||
# modtrezorui
|
||||
CPPDEFINES_MOD += [
|
||||
'TREZOR_FONT_BOLD_ENABLE',
|
||||
('TREZOR_FONT_PREFILL', '0'),
|
||||
('QR_MAX_VERSION', '0'),
|
||||
]
|
||||
SOURCE_MOD += [
|
||||
|
@ -463,9 +463,11 @@ void display_text(int x, int y, const char *text, int textlen, uint8_t font, uin
|
||||
{
|
||||
x += DISPLAY_OFFSET[0];
|
||||
y += DISPLAY_OFFSET[1];
|
||||
#if TREZOR_FONT_PREFILL
|
||||
int w = display_text_width(text, textlen, font);
|
||||
int barwidth = max(w, minwidth);
|
||||
display_bar(x - 1, y - 18, barwidth + 2, 23, bgcolor);
|
||||
#endif
|
||||
display_text_render(x, y, text, textlen, font, fgcolor, bgcolor);
|
||||
}
|
||||
|
||||
@ -474,8 +476,10 @@ void display_text_center(int x, int y, const char *text, int textlen, uint8_t fo
|
||||
x += DISPLAY_OFFSET[0];
|
||||
y += DISPLAY_OFFSET[1];
|
||||
int w = display_text_width(text, textlen, font);
|
||||
#if TREZOR_FONT_PREFILL
|
||||
int barwidth = max(w, minwidth);
|
||||
display_bar(x - barwidth / 2 - 1, y - 18, barwidth + 2, 23, bgcolor);
|
||||
#endif
|
||||
display_text_render(x - w / 2, y, text, textlen, font, fgcolor, bgcolor);
|
||||
}
|
||||
|
||||
@ -484,8 +488,10 @@ void display_text_right(int x, int y, const char *text, int textlen, uint8_t fon
|
||||
x += DISPLAY_OFFSET[0];
|
||||
y += DISPLAY_OFFSET[1];
|
||||
int w = display_text_width(text, textlen, font);
|
||||
#if TREZOR_FONT_PREFILL
|
||||
int barwidth = max(w, minwidth);
|
||||
display_bar(x - barwidth - 1, y - 18, barwidth + 2, 23, bgcolor);
|
||||
#endif
|
||||
display_text_render(x - w, y, text, textlen, font, fgcolor, bgcolor);
|
||||
}
|
||||
|
||||
|
@ -29,6 +29,9 @@
|
||||
#ifdef TREZOR_FONT_BOLD_ENABLE
|
||||
#define FONT_BOLD 2
|
||||
#endif
|
||||
#ifndef TREZOR_FONT_PREFILL
|
||||
#define TREZOR_FONT_PREFILL 1
|
||||
#endif
|
||||
|
||||
#define AVATAR_IMAGE_SIZE 144
|
||||
#define LOADER_ICON_SIZE 64
|
||||
|
Loading…
Reference in New Issue
Block a user