diff --git a/core/embed/rust/src/ui/layout_eckhart/firmware/fido.rs b/core/embed/rust/src/ui/layout_eckhart/firmware/fido.rs index f93c97d3ca..1f085f8bdf 100644 --- a/core/embed/rust/src/ui/layout_eckhart/firmware/fido.rs +++ b/core/embed/rust/src/ui/layout_eckhart/firmware/fido.rs @@ -28,7 +28,6 @@ pub struct FidoCredential { impl FidoCredential { const ICON_SIZE: i16 = 32; - const SPACING: i16 = 24; pub fn new( icon_name: Option>, @@ -45,7 +44,7 @@ impl FidoCredential { ]) .into_paragraphs() .with_placement(LinearPlacement::vertical()) - .with_spacing(Self::SPACING); + .with_spacing(theme::TEXT_VERTICAL_SPACING); Self { app_icon, text, @@ -60,7 +59,8 @@ impl Component for FidoCredential { fn place(&mut self, bounds: Rect) -> Rect { let text_area = if let Some(app_icon) = &mut self.app_icon { let icon_size = app_icon.toif.size(); - let (icon_area, text_area) = bounds.split_top(icon_size.y + Self::SPACING); + let (icon_area, text_area) = + bounds.split_top(icon_size.y + theme::TEXT_VERTICAL_SPACING); app_icon.place(icon_area.with_width(icon_size.x).with_height(icon_size.y)); text_area } else { diff --git a/core/embed/rust/src/ui/layout_eckhart/flow/confirm_output.rs b/core/embed/rust/src/ui/layout_eckhart/flow/confirm_output.rs index e1a87f83b9..b23b1f26b3 100644 --- a/core/embed/rust/src/ui/layout_eckhart/flow/confirm_output.rs +++ b/core/embed/rust/src/ui/layout_eckhart/flow/confirm_output.rs @@ -263,7 +263,7 @@ fn content_menu_info( paragraphs .map_or_else(ParagraphVecShort::new, |p| p) .into_paragraphs() - .with_placement(LinearPlacement::vertical().with_spacing(theme::PARAGRAPHS_SPACING)), + .with_placement(LinearPlacement::vertical().with_spacing(theme::PROP_INNER_SPACING)), ) .with_header(Header::new(title).with_close_button()) .with_subtitle(subtitle.unwrap_or(TString::empty())) @@ -303,7 +303,7 @@ pub fn new_confirm_output( let content_main = TextScreen::new( main_paragraphs .into_paragraphs() - .with_placement(LinearPlacement::vertical().with_spacing(theme::PARAGRAPHS_SPACING)), + .with_placement(LinearPlacement::vertical().with_spacing(theme::PROP_INNER_SPACING)), ) .with_header(Header::new(title.unwrap_or(TString::empty())).with_menu_button()) .with_action_bar(ActionBar::new_single(Button::with_text( @@ -401,7 +401,7 @@ pub fn new_confirm_output( // Summary let content_summary = TextScreen::new(summary_paragraphs.into_paragraphs().with_placement( - LinearPlacement::vertical().with_spacing(theme::PARAGRAPHS_SPACING), + LinearPlacement::vertical().with_spacing(theme::PROP_INNER_SPACING), )) .with_header( Header::new(summary_title.unwrap_or(TR::words__title_summary.into())) diff --git a/core/embed/rust/src/ui/layout_eckhart/flow/confirm_summary.rs b/core/embed/rust/src/ui/layout_eckhart/flow/confirm_summary.rs index e9ceb5f75d..aaad7913fc 100644 --- a/core/embed/rust/src/ui/layout_eckhart/flow/confirm_summary.rs +++ b/core/embed/rust/src/ui/layout_eckhart/flow/confirm_summary.rs @@ -81,7 +81,7 @@ fn content_menu_info( paragraphs .map_or_else(ParagraphVecShort::new, |p| p) .into_paragraphs() - .with_placement(LinearPlacement::vertical().with_spacing(theme::PARAGRAPHS_SPACING)), + .with_placement(LinearPlacement::vertical().with_spacing(theme::PROP_INNER_SPACING)), ) .with_header(Header::new(title).with_close_button()) .with_subtitle(subtitle.unwrap_or(TString::empty())) @@ -121,7 +121,7 @@ pub fn new_confirm_summary( let content_summary = TextScreen::new( summary_paragraphs .into_paragraphs() - .with_placement(LinearPlacement::vertical().with_spacing(theme::PARAGRAPHS_SPACING)), + .with_placement(LinearPlacement::vertical().with_spacing(theme::PROP_INNER_SPACING)), ) .with_header(Header::new(title).with_menu_button()) .with_action_bar(if back_button { diff --git a/core/embed/rust/src/ui/layout_eckhart/flow/continue_recovery_homepage.rs b/core/embed/rust/src/ui/layout_eckhart/flow/continue_recovery_homepage.rs index b6cda1f40b..747fd89861 100644 --- a/core/embed/rust/src/ui/layout_eckhart/flow/continue_recovery_homepage.rs +++ b/core/embed/rust/src/ui/layout_eckhart/flow/continue_recovery_homepage.rs @@ -192,7 +192,7 @@ pub fn new_continue_recovery_homepage( pars_main .into_paragraphs() .with_placement(LinearPlacement::vertical()) - .with_spacing(24), + .with_spacing(theme::TEXT_VERTICAL_SPACING), ) .with_header(header) .with_action_bar(ActionBar::new_single(Button::with_text(verb.into()))) diff --git a/core/embed/rust/src/ui/layout_eckhart/flow/show_danger.rs b/core/embed/rust/src/ui/layout_eckhart/flow/show_danger.rs index 7127424b68..962a1400ef 100644 --- a/core/embed/rust/src/ui/layout_eckhart/flow/show_danger.rs +++ b/core/embed/rust/src/ui/layout_eckhart/flow/show_danger.rs @@ -71,7 +71,7 @@ pub fn new_show_danger( Paragraph::new(&theme::TEXT_MONO_EXTRA_LIGHT, value), ] .into_paragraphs() - .with_placement(LinearPlacement::vertical().with_spacing(35)); + .with_placement(LinearPlacement::vertical().with_spacing(theme::TEXT_VERTICAL_SPACING)); let content_message = TextScreen::new(paragraphs) .with_header( diff --git a/core/embed/rust/src/ui/layout_eckhart/flow/show_share_words.rs b/core/embed/rust/src/ui/layout_eckhart/flow/show_share_words.rs index 9ec41e25d6..657553ef1d 100644 --- a/core/embed/rust/src/ui/layout_eckhart/flow/show_share_words.rs +++ b/core/embed/rust/src/ui/layout_eckhart/flow/show_share_words.rs @@ -80,7 +80,7 @@ pub fn new_show_share_words_flow( instructions_paragraphs .unwrap_or_default() .into_paragraphs() - .with_placement(LinearPlacement::vertical().with_spacing(24)), + .with_placement(LinearPlacement::vertical().with_spacing(theme::TEXT_VERTICAL_SPACING)), ) .with_header(Header::new(TR::reset__recovery_wallet_backup_title.into())) .with_action_bar(ActionBar::new_single(Button::with_text( 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 974cb38ee1..5125386fc7 100644 --- a/core/embed/rust/src/ui/layout_eckhart/theme/mod.rs +++ b/core/embed/rust/src/ui/layout_eckhart/theme/mod.rs @@ -54,9 +54,12 @@ pub const PADDING: i16 = 24; // [px] pub const HEADER_HEIGHT: i16 = 96; // [px] pub const SIDE_INSETS: Insets = Insets::sides(PADDING); pub const ACTION_BAR_HEIGHT: i16 = 90; // [px] -pub const PARAGRAPHS_SPACING: i16 = 12; // [px] pub const TEXT_VERTICAL_SPACING: i16 = 24; // [px] +// props settings +pub const PROP_INNER_SPACING: i16 = 12; // [px] +pub const PROPS_SPACING: i16 = 16; // [px] + // checklist settings pub const CHECKLIST_CHECK_WIDTH: i16 = 32; // [px] pub const CHECKLIST_SPACING: i16 = 40; // [px] diff --git a/core/embed/rust/src/ui/layout_eckhart/ui_firmware.rs b/core/embed/rust/src/ui/layout_eckhart/ui_firmware.rs index d224fa3524..ef4445708f 100644 --- a/core/embed/rust/src/ui/layout_eckhart/ui_firmware.rs +++ b/core/embed/rust/src/ui/layout_eckhart/ui_firmware.rs @@ -251,14 +251,14 @@ impl FirmwareUI for UIEckhart { paragraphs .add( Paragraph::new(&theme::TEXT_SMALL_LIGHT, description) - .with_bottom_padding(theme::PARAGRAPHS_SPACING), + .with_bottom_padding(theme::PROP_INNER_SPACING), ) .add(Paragraph::new(&theme::TEXT_MONO_EXTRA_LIGHT, change).with_bottom_padding(16)); } paragraphs .add( Paragraph::new(&theme::TEXT_SMALL_LIGHT, total_label) - .with_bottom_padding(theme::PARAGRAPHS_SPACING), + .with_bottom_padding(theme::PROP_INNER_SPACING), ) .add(Paragraph::new(&theme::TEXT_MONO_EXTRA_LIGHT, total_fee_new)); @@ -297,7 +297,7 @@ impl FirmwareUI for UIEckhart { let layout = RootComponent::new( TextScreen::new(paragraphs.into_paragraphs().with_placement( - LinearPlacement::vertical().with_spacing(theme::PARAGRAPHS_SPACING), + LinearPlacement::vertical().with_spacing(theme::PROP_INNER_SPACING), )) .with_header(Header::new(TR::modify_amount__title.into())) .with_action_bar(ActionBar::new_cancel_confirm()), @@ -394,7 +394,7 @@ impl FirmwareUI for UIEckhart { title, None, paragraphs.into_paragraphs().with_placement( - LinearPlacement::vertical().with_spacing(theme::PARAGRAPHS_SPACING), + LinearPlacement::vertical().with_spacing(theme::PROP_INNER_SPACING), ), None, verb, @@ -1286,7 +1286,7 @@ impl FirmwareUI for UIEckhart { let screen = TextScreen::new(paragraphs.into_paragraphs().with_placement( - LinearPlacement::vertical().with_spacing(theme::PARAGRAPHS_SPACING), + LinearPlacement::vertical().with_spacing(theme::PROP_INNER_SPACING), )) .with_header(Header::new(title).with_close_button()); let layout = RootComponent::new(screen);