From f793e6d509490ae924ae1d4498642ffd27723895 Mon Sep 17 00:00:00 2001 From: tychovrahe Date: Wed, 29 May 2024 14:27:02 +0200 Subject: [PATCH] refactor(core): move mercury loader to cshape module [no changelog] --- core/embed/rust/src/ui/model_mercury/bootloader/mod.rs | 2 +- core/embed/rust/src/ui/model_mercury/component/loader.rs | 2 +- core/embed/rust/src/ui/model_mercury/component/progress.rs | 2 +- .../rust/src/ui/model_mercury/{shapes.rs => cshape/loader.rs} | 0 core/embed/rust/src/ui/model_mercury/cshape/mod.rs | 4 ++++ core/embed/rust/src/ui/model_mercury/mod.rs | 1 - 6 files changed, 7 insertions(+), 4 deletions(-) rename core/embed/rust/src/ui/model_mercury/{shapes.rs => cshape/loader.rs} (100%) diff --git a/core/embed/rust/src/ui/model_mercury/bootloader/mod.rs b/core/embed/rust/src/ui/model_mercury/bootloader/mod.rs index 45c3c5abda..0acbce9665 100644 --- a/core/embed/rust/src/ui/model_mercury/bootloader/mod.rs +++ b/core/embed/rust/src/ui/model_mercury/bootloader/mod.rs @@ -38,7 +38,7 @@ use super::theme::BLACK; use crate::ui::{ display::{toif::Toif, LOADER_MAX}, geometry::{Alignment, Alignment2D}, - model_mercury::shapes::{render_loader, LoaderRange}, + model_mercury::cshape::{render_loader, LoaderRange}, shape, shape::render_on_display, }; diff --git a/core/embed/rust/src/ui/model_mercury/component/loader.rs b/core/embed/rust/src/ui/model_mercury/component/loader.rs index e55ad1022f..cbbd5bfe03 100644 --- a/core/embed/rust/src/ui/model_mercury/component/loader.rs +++ b/core/embed/rust/src/ui/model_mercury/component/loader.rs @@ -7,7 +7,7 @@ use crate::{ component::{Component, Event, EventCtx, Pad}, display::{self, toif::Icon, Color, LOADER_MAX}, geometry::{Alignment2D, Offset, Rect}, - model_mercury::shapes::{render_loader, LoaderRange}, + model_mercury::cshape::{render_loader, LoaderRange}, shape::{self, Renderer}, util::animation_disabled, }, diff --git a/core/embed/rust/src/ui/model_mercury/component/progress.rs b/core/embed/rust/src/ui/model_mercury/component/progress.rs index 604f1ef26d..e8d9030017 100644 --- a/core/embed/rust/src/ui/model_mercury/component/progress.rs +++ b/core/embed/rust/src/ui/model_mercury/component/progress.rs @@ -13,7 +13,7 @@ use crate::{ geometry::{Insets, Offset, Rect}, model_mercury::{ constant, - shapes::{render_loader, LoaderRange}, + cshape::{render_loader, LoaderRange}, }, shape::Renderer, util::animation_disabled, diff --git a/core/embed/rust/src/ui/model_mercury/shapes.rs b/core/embed/rust/src/ui/model_mercury/cshape/loader.rs similarity index 100% rename from core/embed/rust/src/ui/model_mercury/shapes.rs rename to core/embed/rust/src/ui/model_mercury/cshape/loader.rs diff --git a/core/embed/rust/src/ui/model_mercury/cshape/mod.rs b/core/embed/rust/src/ui/model_mercury/cshape/mod.rs index 0154be1fb7..f23b0faa47 100644 --- a/core/embed/rust/src/ui/model_mercury/cshape/mod.rs +++ b/core/embed/rust/src/ui/model_mercury/cshape/mod.rs @@ -1,3 +1,7 @@ +mod loader; + mod unlock_overlay; pub use unlock_overlay::UnlockOverlay; + +pub use loader::{render_loader, LoaderRange}; diff --git a/core/embed/rust/src/ui/model_mercury/mod.rs b/core/embed/rust/src/ui/model_mercury/mod.rs index 10376795af..0c57214d19 100644 --- a/core/embed/rust/src/ui/model_mercury/mod.rs +++ b/core/embed/rust/src/ui/model_mercury/mod.rs @@ -13,7 +13,6 @@ pub mod flow; #[cfg(feature = "micropython")] pub mod layout; pub mod screens; -pub mod shapes; pub struct ModelMercuryFeatures;