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

feat(core/rust): enlarge delizia footer touch area to make it easier to hit

This commit is contained in:
matejcik 2025-02-03 11:44:31 +01:00 committed by Vít Obrusník
parent 1f0ec4d3c0
commit 6906b532bb

View File

@ -4,10 +4,11 @@ use crate::{
component::{text::TextStyle, Component, Event, EventCtx}, component::{text::TextStyle, Component, Event, EventCtx},
display::{Color, Font}, display::{Color, Font},
event::SwipeEvent, event::SwipeEvent,
geometry::{Alignment, Alignment2D, Direction, Offset, Point, Rect}, geometry::{Alignment, Alignment2D, Direction, Insets, Offset, Point, Rect},
lerp::Lerp, lerp::Lerp,
shape::{self, Renderer, Text}, shape::{self, Renderer, Text},
util::Pager, util::Pager,
CommonUI, ModelUI,
}, },
}; };
@ -157,9 +158,12 @@ impl<'a> Component for Footer<'a> {
type Msg = (); type Msg = ();
fn place(&mut self, bounds: Rect) -> Rect { fn place(&mut self, bounds: Rect) -> Rect {
// place the button over bottom 2/3 of the screen
let button_area = ModelUI::SCREEN.inset(Insets::top(ModelUI::SCREEN.height() / 3));
self.virtual_button.place(button_area);
assert!(bounds.height() == self.content.height()); assert!(bounds.height() == self.content.height());
self.area = bounds; self.area = bounds;
self.virtual_button.place(bounds);
self.area self.area
} }