From 75db03ce74a88d8d6b264d16fbae0f8d55308fd0 Mon Sep 17 00:00:00 2001 From: tychovrahe Date: Mon, 3 Apr 2023 23:40:36 +0200 Subject: [PATCH] fix bld --- core/embed/bootloader/main.c | 2 +- .../rust/src/ui/model_tt/bootloader/mod.rs | 31 +++++++++++++------ 2 files changed, 23 insertions(+), 10 deletions(-) diff --git a/core/embed/bootloader/main.c b/core/embed/bootloader/main.c index 26082584b1..380dc6ce4a 100644 --- a/core/embed/bootloader/main.c +++ b/core/embed/bootloader/main.c @@ -329,7 +329,7 @@ static usb_result_t bootloader_comm_loop(const vendor_header *const vhdr, hal_delay(1000); usb_stop(); usb_deinit(); - ui_screen_boot_empty(true, true); + ui_screen_boot_empty(true); return CONTINUE; } break; diff --git a/core/embed/rust/src/ui/model_tt/bootloader/mod.rs b/core/embed/rust/src/ui/model_tt/bootloader/mod.rs index 5f98834a42..4e40e13679 100644 --- a/core/embed/rust/src/ui/model_tt/bootloader/mod.rs +++ b/core/embed/rust/src/ui/model_tt/bootloader/mod.rs @@ -39,6 +39,9 @@ pub mod welcome; use confirm::Confirm; use intro::Intro; use menu::Menu; +use crate::ui::model_tt::bootloader::theme::TEXT_NORMAL; +use crate::ui::model_tt::component::PinKeyboard; +use crate::ui::model_tt::theme::button_cancel; use self::theme::{RESULT_FW_INSTALL, RESULT_INITIAL, RESULT_WIPE}; @@ -440,16 +443,26 @@ extern "C" fn screen_pairing_confirm(buffer: *const cty::uint8_t) -> u32 { #[no_mangle] extern "C" fn screen_repair_confirm() -> u32 { - let left = Button::with_text("DENY").styled(button_install_cancel()); - let right = Button::with_text("ALLOW").styled(button_install_confirm()); - let mut messages = ParagraphVecShort::new(); + let msg = Label::new( + "Allow repair?", + Alignment::Center, + TEXT_NORMAL, + ); + let right = Button::with_text("DENY").styled(button_confirm()); + let left = Button::with_text("ALLOW").styled(button_cancel()); + let title = Label::new("REPAIR", Alignment::Start, theme::TEXT_BOLD) + .vertically_aligned(Alignment::Center); - messages.add(Paragraph::new(&TEXT_NORMAL_BLACK, "Allow repair?").centered()); + let mut frame = Confirm::new( + BLD_BG, + left, + right, + ConfirmTitle::Text(title), + msg, + None, + None, + ); - let message = - Paragraphs::new(messages).with_placement(LinearPlacement::vertical().align_at_center()); - - let mut pin = Confirm::new(BLACK, None, left, right, false, (None, message), None); - run(&mut pin, true) + run(&mut frame, true) }