mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-07-05 06:12:34 +00:00
fixup! feat(core): integrate new drawing library
This commit is contained in:
parent
e652f46079
commit
c2a117424e
@ -67,10 +67,7 @@ fn touch_eval() -> Option<TouchEvent> {
|
|||||||
TouchEvent::new(event_type, ex as _, ey as _).ok()
|
TouchEvent::new(event_type, ex as _, ey as _).ok()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn render<F>(frame: &mut F)
|
fn render(frame: &mut impl Component) {
|
||||||
where
|
|
||||||
F: Component,
|
|
||||||
{
|
|
||||||
#[cfg(not(feature = "new_rendering"))]
|
#[cfg(not(feature = "new_rendering"))]
|
||||||
{
|
{
|
||||||
display::sync();
|
display::sync();
|
||||||
@ -88,11 +85,7 @@ where
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn run<F>(frame: &mut F) -> u32
|
pub fn run(frame: &mut impl Component<Msg = impl ReturnToC>) -> u32 {
|
||||||
where
|
|
||||||
F: Component,
|
|
||||||
F::Msg: ReturnToC,
|
|
||||||
{
|
|
||||||
frame.place(ModelUI::SCREEN);
|
frame.place(ModelUI::SCREEN);
|
||||||
ModelUI::fadeout();
|
ModelUI::fadeout();
|
||||||
render(frame);
|
render(frame);
|
||||||
@ -121,10 +114,7 @@ where
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn show<F>(frame: &mut F, fading: bool)
|
pub fn show(frame: &mut impl Component, fading: bool) {
|
||||||
where
|
|
||||||
F: Component,
|
|
||||||
{
|
|
||||||
frame.place(ModelUI::SCREEN);
|
frame.place(ModelUI::SCREEN);
|
||||||
|
|
||||||
if fading {
|
if fading {
|
||||||
|
Loading…
Reference in New Issue
Block a user