From f3ced5e831ec0c43986640b394300623900030c6 Mon Sep 17 00:00:00 2001 From: tychovrahe Date: Thu, 9 May 2024 11:54:27 +0200 Subject: [PATCH] feat(core): expand menu button touch area a bit more [no changelog] --- core/embed/rust/src/ui/model_mercury/component/frame.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/core/embed/rust/src/ui/model_mercury/component/frame.rs b/core/embed/rust/src/ui/model_mercury/component/frame.rs index a8aec4e16..26c50e9d5 100644 --- a/core/embed/rust/src/ui/model_mercury/component/frame.rs +++ b/core/embed/rust/src/ui/model_mercury/component/frame.rs @@ -13,7 +13,7 @@ use crate::{ use super::{theme, Button, ButtonMsg, ButtonStyleSheet, CancelInfoConfirmMsg, Footer}; const TITLE_HEIGHT: i16 = 42; -const BUTTON_EXPAND_BORDER: i16 = 16; +const BUTTON_EXPAND_BORDER: i16 = 32; #[derive(Clone)] pub struct Frame { @@ -83,11 +83,7 @@ where } fn with_button(mut self, icon: Icon, msg: CancelInfoConfirmMsg, enabled: bool) -> Self { - let touch_area = Insets { - left: BUTTON_EXPAND_BORDER, - bottom: BUTTON_EXPAND_BORDER, - ..self.border - }; + let touch_area = Insets::uniform(BUTTON_EXPAND_BORDER); self.button = Some(Child::new( Button::with_icon(icon) .with_expanded_touch_area(touch_area)