mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-14 03:30:02 +00:00
fix(core): correctly repaint ShowMore component when requested
This commit is contained in:
parent
3327de6d02
commit
6568f6a150
@ -1,7 +1,7 @@
|
||||
use crate::{
|
||||
strutil::TString,
|
||||
ui::{
|
||||
component::{Child, Component, Event, EventCtx},
|
||||
component::{Child, Component, Event, EventCtx, Never},
|
||||
geometry::{Insets, Rect},
|
||||
shape::Renderer,
|
||||
},
|
||||
@ -43,7 +43,7 @@ where
|
||||
|
||||
impl<T> Component for ShowMore<T>
|
||||
where
|
||||
T: Component,
|
||||
T: Component<Msg = Never>,
|
||||
{
|
||||
type Msg = CancelInfoConfirmMsg;
|
||||
|
||||
@ -56,6 +56,7 @@ where
|
||||
}
|
||||
|
||||
fn event(&mut self, ctx: &mut EventCtx, event: Event) -> Option<Self::Msg> {
|
||||
self.content.event(ctx, event);
|
||||
let button_event = self.buttons.event(ctx, event);
|
||||
|
||||
if let Some(ButtonControllerMsg::Triggered(pos, _)) = button_event {
|
||||
|
@ -32,18 +32,14 @@ use crate::{
|
||||
ui::{
|
||||
backlight::BACKLIGHT_LEVELS_OBJ,
|
||||
component::{
|
||||
base::Component,
|
||||
connect::Connect,
|
||||
paginated::{PageMsg, Paginate},
|
||||
text::{
|
||||
base::Component, connect::Connect, paginated::{PageMsg, Paginate}, text::{
|
||||
op::OpTextLayout,
|
||||
paragraphs::{
|
||||
Checklist, Paragraph, ParagraphSource, ParagraphVecLong, ParagraphVecShort,
|
||||
Paragraphs, VecExt,
|
||||
},
|
||||
TextStyle,
|
||||
},
|
||||
ComponentExt, FormattedText, Label, LineBreaking, Timeout,
|
||||
}, ComponentExt, FormattedText, Label, LineBreaking, Never, Timeout
|
||||
},
|
||||
geometry,
|
||||
layout::{
|
||||
@ -66,7 +62,7 @@ impl From<CancelConfirmMsg> for Obj {
|
||||
|
||||
impl<T> ComponentMsgObj for ShowMore<T>
|
||||
where
|
||||
T: Component,
|
||||
T: Component<Msg = Never>,
|
||||
{
|
||||
fn msg_try_into_obj(&self, msg: Self::Msg) -> Result<Obj, Error> {
|
||||
match msg {
|
||||
|
Loading…
Reference in New Issue
Block a user