diff --git a/core/Makefile b/core/Makefile index 3bca1bb31d..4fdd7cb1df 100644 --- a/core/Makefile +++ b/core/Makefile @@ -131,7 +131,7 @@ SCONS_VARS = \ TREZOR_EMULATOR_ASAN="$(ADDRESS_SANITIZER)" \ TREZOR_EMULATOR_DEBUGGABLE=$(TREZOR_EMULATOR_DEBUGGABLE) \ TREZOR_MEMPERF="$(TREZOR_MEMPERF)" \ - TREZOR_MODEL="$(TREZOR_MODEL)" + TREZOR_MODEL="$(TREZOR_MODEL)" \ SCONS_OPTS = -Q -j $(JOBS) ifeq ($(QUIET_MODE),1) diff --git a/core/embed/models/T3W1/config.mk b/core/embed/models/T3W1/config.mk index 61898195f3..b4542990a9 100644 --- a/core/embed/models/T3W1/config.mk +++ b/core/embed/models/T3W1/config.mk @@ -1,3 +1,3 @@ MCU = STM32U5 OPENOCD_TARGET = target/stm32u5x.cfg -LAYOUT_FEATURE = layout_bolt +LAYOUT_FEATURE = layout_eckhart diff --git a/core/embed/rust/Cargo.toml b/core/embed/rust/Cargo.toml index 8db6885bb5..e6505cd2ff 100644 --- a/core/embed/rust/Cargo.toml +++ b/core/embed/rust/Cargo.toml @@ -11,6 +11,7 @@ crypto = ["zeroize"] layout_bolt = [] layout_caesar = [] layout_delizia = [] +layout_eckhart = [] micropython = [] protobuf = ["micropython"] ui = [] diff --git a/core/embed/rust/src/ui/constant.rs b/core/embed/rust/src/ui/constant.rs index 059e3bebb4..65b3e5d366 100644 --- a/core/embed/rust/src/ui/constant.rs +++ b/core/embed/rust/src/ui/constant.rs @@ -3,11 +3,18 @@ #[cfg(all( feature = "layout_bolt", + not(feature = "layout_caesar"), not(feature = "layout_delizia"), - not(feature = "layout_caesar") + not(feature = "layout_eckhart") ))] pub use super::layout_bolt::constant::*; -#[cfg(all(feature = "layout_caesar", not(feature = "layout_delizia")))] +#[cfg(all( + feature = "layout_caesar", + not(feature = "layout_delizia"), + not(feature = "layout_eckhart") +))] pub use super::layout_caesar::constant::*; -#[cfg(feature = "layout_delizia")] +#[cfg(all(feature = "layout_delizia", not(feature = "layout_eckhart")))] pub use super::layout_delizia::constant::*; +#[cfg(feature = "layout_eckhart")] +pub use super::layout_eckhart::constant::*; diff --git a/core/embed/rust/src/ui/geometry.rs b/core/embed/rust/src/ui/geometry.rs index dde44132e4..f753e02170 100644 --- a/core/embed/rust/src/ui/geometry.rs +++ b/core/embed/rust/src/ui/geometry.rs @@ -30,6 +30,10 @@ const fn clamp(x: i16, min: i16, max: i16) -> i16 { /// Relative offset in 2D space, used for representing translation and /// dimensions of objects. Absolute positions on the screen are represented by /// the `Point` type. +/// +/// Coordinate system orientation: +/// * x-axis: negative values go left, positive values go right +/// * y-axis: negative values go up, positive values go down #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub struct Offset { pub x: i16, diff --git a/core/embed/rust/src/ui/layout_eckhart/bootloader/intro.rs b/core/embed/rust/src/ui/layout_eckhart/bootloader/intro.rs new file mode 100644 index 0000000000..816b14c848 --- /dev/null +++ b/core/embed/rust/src/ui/layout_eckhart/bootloader/intro.rs @@ -0,0 +1,113 @@ +use crate::{ + strutil::TString, + ui::{ + component::{Child, Component, Event, EventCtx, Label, Pad}, + constant::screen, + display::Icon, + geometry::{Alignment, Insets, Point, Rect}, + shape::Renderer, + }, +}; + +use super::super::{ + component::{Button, ButtonMsg::Clicked}, + constant::WIDTH, + theme::bootloader::{ + button_bld, button_bld_menu, text_title, BLD_BG, BUTTON_AREA_START, BUTTON_HEIGHT, + CONTENT_PADDING, CORNER_BUTTON_AREA, MENU32, TEXT_NORMAL, TEXT_WARNING, TITLE_AREA, + }, +}; + +#[repr(u32)] +#[derive(Copy, Clone, ToPrimitive)] +pub enum IntroMsg { + Menu = 1, + Host = 2, +} + +pub struct Intro<'a> { + bg: Pad, + title: Child>, + menu: Child