diff --git a/core/embed/rust/src/ui/layout_eckhart/component/button.rs b/core/embed/rust/src/ui/layout_eckhart/component/button.rs index 276ee71b75..0bb36e4c5b 100644 --- a/core/embed/rust/src/ui/layout_eckhart/component/button.rs +++ b/core/embed/rust/src/ui/layout_eckhart/component/button.rs @@ -403,7 +403,7 @@ pub struct ButtonStyleSheet { pub disabled: &'static ButtonStyle, } -#[derive(PartialEq, Eq)] +#[derive(PartialEq, Eq, Clone)] pub struct ButtonStyle { pub font: Font, pub text_color: Color, 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 ce5b53813b..274ca18f4a 100644 --- a/core/embed/rust/src/ui/layout_eckhart/theme/mod.rs +++ b/core/embed/rust/src/ui/layout_eckhart/theme/mod.rs @@ -40,6 +40,7 @@ pub const ORANGE_EXTRA_DARK: Color = Color::rgb(0x12, 0x07, 0x04); pub const YELLOW: Color = Color::rgb(0xFF, 0xE4, 0x58); +pub const RED: Color = Color::rgb(0xFF, 0x30, 0x30); pub const FATAL_ERROR_COLOR: Color = Color::rgb(0xE7, 0x0E, 0x0E); pub const FATAL_ERROR_HIGHLIGHT_COLOR: Color = Color::rgb(0xFF, 0x41, 0x41); @@ -147,6 +148,10 @@ pub const fn label_title_main() -> TextStyle { TEXT_SMALL } +pub const fn label_menu_item_subtitle() -> TextStyle { + TextStyle::new(fonts::FONT_SATOSHI_REGULAR_22, GREY, BG, GREY, GREY) +} + // Button styles pub const fn button_default() -> ButtonStyleSheet { ButtonStyleSheet { @@ -252,6 +257,47 @@ pub const fn button_header() -> ButtonStyleSheet { } } +// Macro for styles differing only in text color +macro_rules! menu_item_title { + ($color:expr) => { + ButtonStyleSheet { + normal: &ButtonStyle { + font: fonts::FONT_SATOSHI_REGULAR_38, + text_color: $color, + button_color: BG, + icon_color: $color, + background_color: BG, + }, + active: &ButtonStyle { + font: fonts::FONT_SATOSHI_REGULAR_38, + text_color: $color, + button_color: BG, + icon_color: $color, + background_color: BG, + }, + disabled: &ButtonStyle { + font: fonts::FONT_SATOSHI_REGULAR_38, + text_color: GREY_DARK, + button_color: BG, + icon_color: GREY_DARK, + background_color: BG, + }, + } + }; +} + +pub const fn menu_item_title() -> ButtonStyleSheet { + menu_item_title!(GREY_LIGHT) +} + +pub const fn menu_item_title_yellow() -> ButtonStyleSheet { + menu_item_title!(YELLOW) +} + +pub const fn menu_item_title_red() -> ButtonStyleSheet { + menu_item_title!(RED) +} + // Result constants pub const RESULT_PADDING: i16 = 6; pub const RESULT_FOOTER_START: i16 = 171;