use crate::{ strutil::TString, ui::{ component::{Child, Component, ComponentExt, Event, EventCtx, Label, Pad}, constant, constant::screen, display::{Color, Icon}, geometry::{Alignment2D, Insets, Offset, Point, Rect}, model_tt::{ component::{Button, ButtonMsg::Clicked, ButtonStyleSheet}, constant::WIDTH, theme::{ bootloader::{ text_fingerprint, text_title, BUTTON_AREA_START, BUTTON_HEIGHT, CONTENT_PADDING, CORNER_BUTTON_AREA, CORNER_BUTTON_TOUCH_EXPANSION, INFO32, TITLE_AREA, X32, }, WHITE, }, }, }, }; const ICON_TOP: i16 = 17; const CONTENT_START: i16 = 72; const CONTENT_AREA: Rect = Rect::new( Point::new(CONTENT_PADDING, CONTENT_START), Point::new(WIDTH - CONTENT_PADDING, BUTTON_AREA_START - CONTENT_PADDING), ); #[derive(Copy, Clone, ToPrimitive)] pub enum ConfirmMsg { Cancel = 1, Confirm = 2, } pub enum ConfirmTitle { Text(Label<'static>), Icon(Icon), } pub struct ConfirmInfo<'a> { pub title: Child>, pub text: Child>, pub info_button: Child