1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-24 15:28:10 +00:00

fix(core/ui): fix model R common title

The title previously disappeared after going back and forth. Used in PIN
setting and FIDO confirm.

[no changelog]
This commit is contained in:
obrusvit 2024-04-28 15:49:30 +02:00 committed by Vít Obrusník
parent 68e01a48cb
commit fccfa43ac9

View File

@ -20,8 +20,9 @@ where
pages: FlowPages<F>, pages: FlowPages<F>,
/// Instance of the current Page /// Instance of the current Page
current_page: Page, current_page: Page,
/// Title being shown at the top in bold /// Title being shown at the top in bold upper
title: Option<Title>, title: Option<Title>,
has_common_title: bool,
scrollbar: Child<ScrollBar>, scrollbar: Child<ScrollBar>,
content_area: Rect, content_area: Rect,
title_area: Rect, title_area: Rect,
@ -46,6 +47,7 @@ where
pages, pages,
current_page, current_page,
title, title,
has_common_title: false,
content_area: Rect::zero(), content_area: Rect::zero(),
title_area: Rect::zero(), title_area: Rect::zero(),
scrollbar: Child::new(ScrollBar::to_be_filled_later()), scrollbar: Child::new(ScrollBar::to_be_filled_later()),
@ -65,6 +67,7 @@ where
/// with the page content, as the content will be offset. /// with the page content, as the content will be offset.
pub fn with_common_title(mut self, title: TString<'static>) -> Self { pub fn with_common_title(mut self, title: TString<'static>) -> Self {
self.title = Some(Title::new(title)); self.title = Some(Title::new(title));
self.has_common_title = true;
self self
} }