1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-03-03 16:56:07 +00:00

chore(eckhart): add warning text styles

This commit is contained in:
Lukas Bielesch 2025-02-26 12:13:46 +01:00 committed by obrusvit
parent 65e8a12e38
commit 5fb3f7e98f

View File

@ -154,8 +154,28 @@ pub fn get_chunkified_text_style(_character_length: usize) -> &'static TextStyle
&TEXT_MONO_MEDIUM
}
// Macro for styles differing only in text color
macro_rules! label_title {
($color:expr) => {
TextStyle::new(fonts::FONT_SATOSHI_REGULAR_22, $color, BG, $color, $color)
.with_line_spacing(-4)
};
}
pub const fn label_title_main() -> TextStyle {
TEXT_SMALL
label_title!(GREY)
}
pub const fn label_title_confirm() -> TextStyle {
label_title!(GREEN_LIGHT)
}
pub const fn label_title_danger() -> TextStyle {
label_title!(ORANGE)
}
pub const fn label_title_warning() -> TextStyle {
label_title!(YELLOW)
}
pub const fn label_menu_item_subtitle() -> TextStyle {