1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-02-06 12:51:21 +00:00

fixup! refactor(core): consistent naming of UI layouts

This commit is contained in:
obrusvit 2025-01-17 16:58:07 +01:00
parent 5107298c3c
commit 21b464c6dd
9 changed files with 24 additions and 21 deletions

View File

@ -17,6 +17,7 @@ use super::{
bl_confirm::{Confirm, ConfirmMsg}, bl_confirm::{Confirm, ConfirmMsg},
ResultScreen, WelcomeScreen, ResultScreen, WelcomeScreen,
}, },
cshape,
theme::{ theme::{
bootloader::{BLD_BG, BLD_FG, ICON_ALERT, ICON_SPINNER, ICON_SUCCESS}, bootloader::{BLD_BG, BLD_FG, ICON_ALERT, ICON_SPINNER, ICON_SUCCESS},
ICON_ARM_LEFT, ICON_ARM_RIGHT, TEXT_BOLD, TEXT_NORMAL, ICON_ARM_LEFT, ICON_ARM_RIGHT, TEXT_BOLD, TEXT_NORMAL,
@ -24,10 +25,7 @@ use super::{
UICaesar, UICaesar,
}; };
use crate::ui::{ use crate::ui::{display::toif::Toif, geometry::Alignment, shape, shape::render_on_display};
display::toif::Toif, geometry::Alignment, layout_caesar::cshape, shape,
shape::render_on_display,
};
use ufmt::uwrite; use ufmt::uwrite;

View File

@ -16,6 +16,7 @@ use super::{
bl_confirm::{Confirm, ConfirmTitle}, bl_confirm::{Confirm, ConfirmTitle},
Button, ResultScreen, WelcomeScreen, Button, ResultScreen, WelcomeScreen,
}, },
cshape::{render_loader, LoaderRange},
theme, theme,
theme::{ theme::{
bootloader::{ bootloader::{
@ -34,7 +35,6 @@ use crate::ui::{ui_bootloader::BootloaderUI, CommonUI};
use crate::ui::{ use crate::ui::{
display::{toif::Toif, LOADER_MAX}, display::{toif::Toif, LOADER_MAX},
geometry::Alignment2D, geometry::Alignment2D,
layout_delizia::cshape::{render_loader, LoaderRange},
shape, shape,
shape::render_on_display, shape::render_on_display,
}; };

View File

@ -20,7 +20,7 @@ const TITLE_AREA_START: i16 = 70;
const MESSAGE_AREA_START: i16 = 90; const MESSAGE_AREA_START: i16 = 90;
#[cfg(feature = "bootloader")] #[cfg(feature = "bootloader")]
const STYLE: &ResultStyle = &crate::ui::layout_delizia::theme::bootloader::RESULT_WIPE; const STYLE: &ResultStyle = &super::theme::bootloader::RESULT_WIPE;
#[cfg(not(feature = "bootloader"))] #[cfg(not(feature = "bootloader"))]
const STYLE: &ResultStyle = &super::theme::RESULT_ERROR; const STYLE: &ResultStyle = &super::theme::RESULT_ERROR;

View File

@ -12,12 +12,13 @@ use crate::{
display::{Color, Icon}, display::{Color, Icon},
event::SwipeEvent, event::SwipeEvent,
geometry::{Alignment, Direction, Insets, Point, Rect}, geometry::{Alignment, Direction, Insets, Point, Rect},
layout_delizia::theme::TITLE_HEIGHT,
lerp::Lerp, lerp::Lerp,
shape::{self, Renderer}, shape::{self, Renderer},
}, },
}; };
use super::super::theme::TITLE_HEIGHT;
#[derive(Clone)] #[derive(Clone)]
pub struct HorizontalSwipe { pub struct HorizontalSwipe {
progress: i16, progress: i16,

View File

@ -12,7 +12,10 @@ use crate::{
}, },
}; };
use super::{theme, Button, ButtonContent, ButtonMsg}; use super::{
theme::{self, TITLE_HEIGHT},
Button, ButtonContent, ButtonMsg,
};
#[cfg(feature = "haptic")] #[cfg(feature = "haptic")]
use crate::trezorhal::haptic::{self, HapticEffect}; use crate::trezorhal::haptic::{self, HapticEffect};
@ -22,7 +25,6 @@ use crate::{
component::Label, component::Label,
constant::screen, constant::screen,
geometry::{Alignment, Point}, geometry::{Alignment, Point},
layout_delizia::theme::TITLE_HEIGHT,
}, },
}; };
use pareen; use pareen;

View File

@ -18,17 +18,17 @@ use crate::{
use crate::ui::{ use crate::ui::{
component::{base::AttachType, Label}, component::{base::AttachType, Label},
constant::{screen, HEIGHT, WIDTH}, constant::{screen, HEIGHT, WIDTH},
layout_delizia::{
constant, cshape,
cshape::UnlockOverlay,
theme::{GREY_LIGHT, HOMESCREEN_ICON, ICON_KEY},
},
lerp::Lerp, lerp::Lerp,
shape::{render_on_canvas, ImageBuffer, Rgb565Canvas}, shape::{render_on_canvas, ImageBuffer, Rgb565Canvas},
util::animation_disabled, util::animation_disabled,
}; };
use super::{theme, Loader, LoaderMsg}; use super::{
super::cshape::{self, UnlockOverlay},
constant, theme,
theme::{GREY_LIGHT, HOMESCREEN_ICON, ICON_KEY},
Loader, LoaderMsg,
};
const AREA: Rect = constant::screen(); const AREA: Rect = constant::screen();
const TOP_CENTER: Point = AREA.top_center(); const TOP_CENTER: Point = AREA.top_center();

View File

@ -7,13 +7,15 @@ use crate::{
component::{Component, Event, EventCtx, Pad}, component::{Component, Event, EventCtx, Pad},
display::{self, toif::Icon, Color, LOADER_MAX}, display::{self, toif::Icon, Color, LOADER_MAX},
geometry::{Alignment2D, Offset, Rect}, geometry::{Alignment2D, Offset, Rect},
layout_delizia::cshape::{render_loader, LoaderRange},
shape::{self, Renderer}, shape::{self, Renderer},
util::animation_disabled, util::animation_disabled,
}, },
}; };
use super::{constant, theme}; use super::{
super::cshape::{render_loader, LoaderRange},
constant, theme,
};
const GROWING_DURATION_MS: u32 = 1000; const GROWING_DURATION_MS: u32 = 1000;
const SHRINKING_DURATION_MS: u32 = 500; const SHRINKING_DURATION_MS: u32 = 500;

View File

@ -1,6 +1,6 @@
use crate::ui::{ use crate::ui::{display::Color, geometry::Point, shape, shape::Renderer};
display::Color, geometry::Point, layout_delizia::constant, shape, shape::Renderer,
}; use super::super::constant;
pub enum LoaderRange { pub enum LoaderRange {
Full, Full,

View File

@ -1,5 +1,5 @@
use super::{geometry::Rect, CommonUI}; use super::{geometry::Rect, CommonUI};
use crate::ui::layout_delizia::theme::backlight; use theme::backlight;
#[cfg(feature = "bootloader")] #[cfg(feature = "bootloader")]
pub mod bootloader; pub mod bootloader;