diff --git a/core/embed/rust/src/ui/model_tt/mod.rs b/core/embed/rust/src/ui/model_tt/mod.rs index a4f353e047..4e54439e7d 100644 --- a/core/embed/rust/src/ui/model_tt/mod.rs +++ b/core/embed/rust/src/ui/model_tt/mod.rs @@ -8,7 +8,11 @@ pub mod theme; #[cfg(feature = "micropython")] pub mod layout; -mod screens; + +use crate::ui::{ + layout::simplified::show, + model_tt::component::{ErrorScreen, WelcomeScreen}, +}; pub struct ModelTTFeatures; @@ -31,10 +35,12 @@ impl UIFeaturesCommon for ModelTTFeatures { const SCREEN: Rect = constant::SCREEN; fn screen_fatal_error(title: &str, msg: &str, footer: &str) { - screens::screen_fatal_error(title, msg, footer); + let mut frame = ErrorScreen::new(title.into(), msg.into(), footer.into()); + show(&mut frame, false); } fn screen_boot_stage_2() { - screens::screen_boot_stage_2(); + let mut frame = WelcomeScreen::new(false); + show(&mut frame, false); } } diff --git a/core/embed/rust/src/ui/model_tt/screens.rs b/core/embed/rust/src/ui/model_tt/screens.rs deleted file mode 100644 index 0446b773cc..0000000000 --- a/core/embed/rust/src/ui/model_tt/screens.rs +++ /dev/null @@ -1,47 +0,0 @@ -use crate::ui::{ - component::Component, - constant::screen, - display, - model_tt::{ - component::{ErrorScreen, WelcomeScreen}, - constant, - }, -}; - -#[cfg(feature = "new_rendering")] -use crate::ui::{display::Color, shape::render_on_display}; - -pub fn screen_fatal_error(title: &str, msg: &str, footer: &str) { - let mut frame = ErrorScreen::new(title.into(), msg.into(), footer.into()); - frame.place(constant::screen()); - - #[cfg(feature = "new_rendering")] - render_on_display(None, Some(Color::black()), |target| { - frame.render(target); - }); - - #[cfg(not(feature = "new_rendering"))] - frame.paint(); - display::refresh(); -} - -pub fn screen_boot_stage_2() { - let mut frame = WelcomeScreen::new(false); - frame.place(screen()); - - #[cfg(feature = "new_rendering")] - { - display::sync(); - render_on_display(None, Some(Color::black()), |target| { - frame.render(target); - }); - display::refresh(); - } - - #[cfg(not(feature = "new_rendering"))] - { - display::sync(); - frame.paint(); - display::refresh(); - } -}