From c16d375abca64c98da820273ed2ea00e17ff13c4 Mon Sep 17 00:00:00 2001 From: Martin Milata Date: Wed, 18 Jun 2025 01:58:33 +0200 Subject: [PATCH] refactor(core): eckhart: add close button to THP pairing UI [no changelog] --- core/embed/rust/src/ui/layout_eckhart/ui_firmware.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/core/embed/rust/src/ui/layout_eckhart/ui_firmware.rs b/core/embed/rust/src/ui/layout_eckhart/ui_firmware.rs index f1de58bbe2..13c2769b9a 100644 --- a/core/embed/rust/src/ui/layout_eckhart/ui_firmware.rs +++ b/core/embed/rust/src/ui/layout_eckhart/ui_firmware.rs @@ -1085,9 +1085,13 @@ impl FirmwareUI for UIEckhart { .add_newline() .add_alignment(Alignment::Center) .add_text(code, fonts::FONT_SATOSHI_EXTRALIGHT_72); - let mut screen = TextScreen::new(FormattedText::new(ops)).with_header(Header::new(title)); + let mut screen = TextScreen::new(FormattedText::new(ops)); if button { - screen = screen.with_action_bar(ActionBar::new_cancel_confirm()); + screen = screen + .with_header(Header::new(title)) + .with_action_bar(ActionBar::new_cancel_confirm()); + } else { + screen = screen.with_header(Header::new(title).with_close_button()); } #[cfg(feature = "ble")] let screen = crate::ui::component::BLEHandler::new(screen, false);