diff --git a/core/.changelog.d/3324.fixed b/core/.changelog.d/3324.fixed new file mode 100644 index 0000000000..1214e02554 --- /dev/null +++ b/core/.changelog.d/3324.fixed @@ -0,0 +1 @@ +[T2B1, T3B1] Fix "PIN attempts exceeded" screen diff --git a/core/embed/rtl/error_handling.c b/core/embed/rtl/error_handling.c index 8c6288693e..1c91097c1c 100644 --- a/core/embed/rtl/error_handling.c +++ b/core/embed/rtl/error_handling.c @@ -58,9 +58,9 @@ void __attribute__((noreturn)) show_wipe_code_screen(void) { } void __attribute__((noreturn)) show_pin_too_many_screen(void) { - error_shutdown_ex("TOO MANY PIN ATTEMPTS", - "All data has been erased from the device", - "PLEASE RECONNECT\nTHE DEVICE"); + error_shutdown_ex("PIN ATTEMPTS\nEXCEEDED", + "All data has been\nerased from the device", + "Please reconnect the\ndevice"); } void __attribute__((noreturn)) show_install_restricted_screen(void) { diff --git a/core/embed/rust/src/ui/layout_samson/component/error.rs b/core/embed/rust/src/ui/layout_samson/component/error.rs index c033929da9..45d297af3f 100644 --- a/core/embed/rust/src/ui/layout_samson/component/error.rs +++ b/core/embed/rust/src/ui/layout_samson/component/error.rs @@ -48,19 +48,19 @@ impl Component for ErrorScreen<'_> { fn place(&mut self, _bounds: Rect) -> Rect { self.bg.place(screen()); - let title_area = Rect::new(screen().top_left(), screen().top_right() + Offset::y(11)); - self.title.place(title_area); - let text_width = self.title.inner().max_size().x; - - if text_width > title_area.width() - 2 * TITLE_AREA_HEIGHT { + if text_width > screen().width() - 2 * TITLE_AREA_HEIGHT { + // if the title is too long, don't show the icons self.show_icons = false; } + let title_area = self.title.place(screen()); let top_offset = if self.show_icons { - Offset::y(11) + // show warning icons when the title fits a single line + Offset::y(TITLE_AREA_HEIGHT) } else { - Offset::y(8) + // longer titles will be split and rendered without icons + Offset::y(title_area.height()) }; let message_area = Rect::new(