From 5fb3f7e98fb3066cdf307801b8a0f8a70ec10d40 Mon Sep 17 00:00:00 2001 From: Lukas Bielesch Date: Wed, 26 Feb 2025 12:13:46 +0100 Subject: [PATCH] chore(eckhart): add warning text styles --- .../rust/src/ui/layout_eckhart/theme/mod.rs | 22 ++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/core/embed/rust/src/ui/layout_eckhart/theme/mod.rs b/core/embed/rust/src/ui/layout_eckhart/theme/mod.rs index a57af7c356..995c3150c6 100644 --- a/core/embed/rust/src/ui/layout_eckhart/theme/mod.rs +++ b/core/embed/rust/src/ui/layout_eckhart/theme/mod.rs @@ -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 {