mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-01-29 16:51:30 +00:00
fixup! refactor(core): consistent naming of UI layouts
This commit is contained in:
parent
5107298c3c
commit
21b464c6dd
@ -17,6 +17,7 @@ use super::{
|
||||
bl_confirm::{Confirm, ConfirmMsg},
|
||||
ResultScreen, WelcomeScreen,
|
||||
},
|
||||
cshape,
|
||||
theme::{
|
||||
bootloader::{BLD_BG, BLD_FG, ICON_ALERT, ICON_SPINNER, ICON_SUCCESS},
|
||||
ICON_ARM_LEFT, ICON_ARM_RIGHT, TEXT_BOLD, TEXT_NORMAL,
|
||||
@ -24,10 +25,7 @@ use super::{
|
||||
UICaesar,
|
||||
};
|
||||
|
||||
use crate::ui::{
|
||||
display::toif::Toif, geometry::Alignment, layout_caesar::cshape, shape,
|
||||
shape::render_on_display,
|
||||
};
|
||||
use crate::ui::{display::toif::Toif, geometry::Alignment, shape, shape::render_on_display};
|
||||
|
||||
use ufmt::uwrite;
|
||||
|
||||
|
@ -16,6 +16,7 @@ use super::{
|
||||
bl_confirm::{Confirm, ConfirmTitle},
|
||||
Button, ResultScreen, WelcomeScreen,
|
||||
},
|
||||
cshape::{render_loader, LoaderRange},
|
||||
theme,
|
||||
theme::{
|
||||
bootloader::{
|
||||
@ -34,7 +35,6 @@ use crate::ui::{ui_bootloader::BootloaderUI, CommonUI};
|
||||
use crate::ui::{
|
||||
display::{toif::Toif, LOADER_MAX},
|
||||
geometry::Alignment2D,
|
||||
layout_delizia::cshape::{render_loader, LoaderRange},
|
||||
shape,
|
||||
shape::render_on_display,
|
||||
};
|
||||
|
@ -20,7 +20,7 @@ const TITLE_AREA_START: i16 = 70;
|
||||
const MESSAGE_AREA_START: i16 = 90;
|
||||
|
||||
#[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"))]
|
||||
const STYLE: &ResultStyle = &super::theme::RESULT_ERROR;
|
||||
|
||||
|
@ -12,12 +12,13 @@ use crate::{
|
||||
display::{Color, Icon},
|
||||
event::SwipeEvent,
|
||||
geometry::{Alignment, Direction, Insets, Point, Rect},
|
||||
layout_delizia::theme::TITLE_HEIGHT,
|
||||
lerp::Lerp,
|
||||
shape::{self, Renderer},
|
||||
},
|
||||
};
|
||||
|
||||
use super::super::theme::TITLE_HEIGHT;
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct HorizontalSwipe {
|
||||
progress: i16,
|
||||
|
@ -12,7 +12,10 @@ use crate::{
|
||||
},
|
||||
};
|
||||
|
||||
use super::{theme, Button, ButtonContent, ButtonMsg};
|
||||
use super::{
|
||||
theme::{self, TITLE_HEIGHT},
|
||||
Button, ButtonContent, ButtonMsg,
|
||||
};
|
||||
|
||||
#[cfg(feature = "haptic")]
|
||||
use crate::trezorhal::haptic::{self, HapticEffect};
|
||||
@ -22,7 +25,6 @@ use crate::{
|
||||
component::Label,
|
||||
constant::screen,
|
||||
geometry::{Alignment, Point},
|
||||
layout_delizia::theme::TITLE_HEIGHT,
|
||||
},
|
||||
};
|
||||
use pareen;
|
||||
|
@ -18,17 +18,17 @@ use crate::{
|
||||
use crate::ui::{
|
||||
component::{base::AttachType, Label},
|
||||
constant::{screen, HEIGHT, WIDTH},
|
||||
layout_delizia::{
|
||||
constant, cshape,
|
||||
cshape::UnlockOverlay,
|
||||
theme::{GREY_LIGHT, HOMESCREEN_ICON, ICON_KEY},
|
||||
},
|
||||
lerp::Lerp,
|
||||
shape::{render_on_canvas, ImageBuffer, Rgb565Canvas},
|
||||
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 TOP_CENTER: Point = AREA.top_center();
|
||||
|
@ -7,13 +7,15 @@ use crate::{
|
||||
component::{Component, Event, EventCtx, Pad},
|
||||
display::{self, toif::Icon, Color, LOADER_MAX},
|
||||
geometry::{Alignment2D, Offset, Rect},
|
||||
layout_delizia::cshape::{render_loader, LoaderRange},
|
||||
shape::{self, Renderer},
|
||||
util::animation_disabled,
|
||||
},
|
||||
};
|
||||
|
||||
use super::{constant, theme};
|
||||
use super::{
|
||||
super::cshape::{render_loader, LoaderRange},
|
||||
constant, theme,
|
||||
};
|
||||
|
||||
const GROWING_DURATION_MS: u32 = 1000;
|
||||
const SHRINKING_DURATION_MS: u32 = 500;
|
||||
|
@ -1,6 +1,6 @@
|
||||
use crate::ui::{
|
||||
display::Color, geometry::Point, layout_delizia::constant, shape, shape::Renderer,
|
||||
};
|
||||
use crate::ui::{display::Color, geometry::Point, shape, shape::Renderer};
|
||||
|
||||
use super::super::constant;
|
||||
|
||||
pub enum LoaderRange {
|
||||
Full,
|
||||
|
@ -1,5 +1,5 @@
|
||||
use super::{geometry::Rect, CommonUI};
|
||||
use crate::ui::layout_delizia::theme::backlight;
|
||||
use theme::backlight;
|
||||
|
||||
#[cfg(feature = "bootloader")]
|
||||
pub mod bootloader;
|
||||
|
Loading…
Reference in New Issue
Block a user