mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-26 17:38:39 +00:00
feat(core): expand menu button touch area a bit more
[no changelog]
This commit is contained in:
parent
e0fece2050
commit
f3ced5e831
@ -13,7 +13,7 @@ use crate::{
|
|||||||
use super::{theme, Button, ButtonMsg, ButtonStyleSheet, CancelInfoConfirmMsg, Footer};
|
use super::{theme, Button, ButtonMsg, ButtonStyleSheet, CancelInfoConfirmMsg, Footer};
|
||||||
|
|
||||||
const TITLE_HEIGHT: i16 = 42;
|
const TITLE_HEIGHT: i16 = 42;
|
||||||
const BUTTON_EXPAND_BORDER: i16 = 16;
|
const BUTTON_EXPAND_BORDER: i16 = 32;
|
||||||
|
|
||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
pub struct Frame<T> {
|
pub struct Frame<T> {
|
||||||
@ -83,11 +83,7 @@ where
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn with_button(mut self, icon: Icon, msg: CancelInfoConfirmMsg, enabled: bool) -> Self {
|
fn with_button(mut self, icon: Icon, msg: CancelInfoConfirmMsg, enabled: bool) -> Self {
|
||||||
let touch_area = Insets {
|
let touch_area = Insets::uniform(BUTTON_EXPAND_BORDER);
|
||||||
left: BUTTON_EXPAND_BORDER,
|
|
||||||
bottom: BUTTON_EXPAND_BORDER,
|
|
||||||
..self.border
|
|
||||||
};
|
|
||||||
self.button = Some(Child::new(
|
self.button = Some(Child::new(
|
||||||
Button::with_icon(icon)
|
Button::with_icon(icon)
|
||||||
.with_expanded_touch_area(touch_area)
|
.with_expanded_touch_area(touch_area)
|
||||||
|
Loading…
Reference in New Issue
Block a user