mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-02-26 14:22:06 +00:00
fix(core/ui): make it harder to accidentally close VerticalMenu
This commit is contained in:
parent
30ca8bdd62
commit
d2bfe56293
@ -195,10 +195,14 @@ where
|
||||
fn event(&mut self, ctx: &mut EventCtx, event: Event) -> Option<Self::Msg> {
|
||||
self.title.event(ctx, event);
|
||||
self.subtitle.event(ctx, event);
|
||||
let msg = self.content.event(ctx, event).map(FrameMsg::Content);
|
||||
if msg.is_some() {
|
||||
return msg;
|
||||
}
|
||||
if let Some(ButtonMsg::Clicked) = self.button.event(ctx, event) {
|
||||
return Some(FrameMsg::Button(self.button_msg));
|
||||
}
|
||||
self.content.event(ctx, event).map(FrameMsg::Content)
|
||||
None
|
||||
}
|
||||
|
||||
fn paint(&mut self) {
|
||||
|
Loading…
Reference in New Issue
Block a user