From 6906b532bbb5684184d11e4e105062f06488ecd6 Mon Sep 17 00:00:00 2001 From: matejcik Date: Mon, 3 Feb 2025 11:44:31 +0100 Subject: [PATCH] feat(core/rust): enlarge delizia footer touch area to make it easier to hit --- core/embed/rust/src/ui/layout_delizia/component/footer.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/core/embed/rust/src/ui/layout_delizia/component/footer.rs b/core/embed/rust/src/ui/layout_delizia/component/footer.rs index 69c8e9a13c..08132dab4c 100644 --- a/core/embed/rust/src/ui/layout_delizia/component/footer.rs +++ b/core/embed/rust/src/ui/layout_delizia/component/footer.rs @@ -4,10 +4,11 @@ use crate::{ component::{text::TextStyle, Component, Event, EventCtx}, display::{Color, Font}, event::SwipeEvent, - geometry::{Alignment, Alignment2D, Direction, Offset, Point, Rect}, + geometry::{Alignment, Alignment2D, Direction, Insets, Offset, Point, Rect}, lerp::Lerp, shape::{self, Renderer, Text}, util::Pager, + CommonUI, ModelUI, }, }; @@ -157,9 +158,12 @@ impl<'a> Component for Footer<'a> { type Msg = (); 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()); self.area = bounds; - self.virtual_button.place(bounds); self.area }