diff --git a/core/embed/rust/src/ui/layout/obj.rs b/core/embed/rust/src/ui/layout/obj.rs index 3b6213932..315744e61 100644 --- a/core/embed/rust/src/ui/layout/obj.rs +++ b/core/embed/rust/src/ui/layout/obj.rs @@ -131,6 +131,7 @@ struct LayoutObjInner { impl LayoutObj { /// Create a new `LayoutObj`, wrapping a root component. + #[inline(never)] pub fn new(root: impl ComponentMsgObj + MaybeTrace + 'static) -> Result, Error> { // Let's wrap the root component into a `Root` to maintain the top-level // invalidation logic. diff --git a/core/embed/rust/src/ui/model_mercury/component/frame.rs b/core/embed/rust/src/ui/model_mercury/component/frame.rs index d93ccb2af..14005fd89 100644 --- a/core/embed/rust/src/ui/model_mercury/component/frame.rs +++ b/core/embed/rust/src/ui/model_mercury/component/frame.rs @@ -68,14 +68,17 @@ where } } + #[inline(never)] pub const fn left_aligned(title: TString<'static>, content: T) -> Self { Self::new(Alignment::Start, title, content) } + #[inline(never)] pub const fn right_aligned(title: TString<'static>, content: T) -> Self { Self::new(Alignment::End, title, content) } + #[inline(never)] pub const fn centered(title: TString<'static>, content: T) -> Self { Self::new(Alignment::Center, title, content) } @@ -90,6 +93,7 @@ where self } + #[inline(never)] pub fn with_subtitle(mut self, subtitle: TString<'static>) -> Self { let style = theme::TEXT_SUB_GREY; self.title = Child::new(self.title.into_inner().top_aligned()); @@ -173,16 +177,14 @@ where }) } - pub fn with_swipe(self, dir: SwipeDirection, settings: SwipeSettings) -> Self { - Self { - footer: self.footer.map(|f| match dir { - SwipeDirection::Up => f.with_swipe_up(), - SwipeDirection::Down => f.with_swipe_down(), - _ => f, - }), - swipe: self.swipe.with_swipe(dir, settings), - ..self - } + pub fn with_swipe(mut self, dir: SwipeDirection, settings: SwipeSettings) -> Self { + self.footer = self.footer.map(|f| match dir { + SwipeDirection::Up => f.with_swipe_up(), + SwipeDirection::Down => f.with_swipe_down(), + _ => f, + }); + self.swipe = self.swipe.with_swipe(dir, settings); + self } pub fn with_horizontal_pages(self) -> Self { diff --git a/core/embed/rust/src/ui/model_mercury/flow/util.rs b/core/embed/rust/src/ui/model_mercury/flow/util.rs index 8a0f0ef90..7b7c4324c 100644 --- a/core/embed/rust/src/ui/model_mercury/flow/util.rs +++ b/core/embed/rust/src/ui/model_mercury/flow/util.rs @@ -175,21 +175,25 @@ impl ShowInfoParams { } } + #[inline(never)] pub const fn with_subtitle(mut self, subtitle: Option>) -> Self { self.subtitle = subtitle; self } + #[inline(never)] pub const fn with_menu_button(mut self) -> Self { self.menu_button = true; self } + #[inline(never)] pub const fn with_cancel_button(mut self) -> Self { self.cancel_button = true; self } + #[inline(never)] pub const fn with_footer( mut self, instruction: TString<'static>, @@ -210,6 +214,7 @@ impl ShowInfoParams { self } + #[inline(never)] pub fn into_layout( self, ) -> Result + Swipable + MaybeTrace, Error> {