refactor(core/delizia): rename `Frame::new()` to `Frame::with_header()`
What changed, and why it matters
This commit is a simple code cleanup: it renames a Rust function from Frame::new() to Frame::with_header() and updates every place that called it. There is no change to what the code does, no bug fix, and no security-relevant behavior.
No action needed; this is a non-security refactor.
Security signals we found
No strong security signals were identified.
Evidence from the diff
A pure refactor across 21 files in the Trezor firmware’s Delizia UI layout. The Frame constructor is renamed from new() to with_header(), and all call sites are mechanically updated. No logic, signatures, or runtime behavior changes.
Changed components
core/embed/rust/src/ui/layout_delizia/component/frame.rscore/embed/rust/src/ui/layout_delizia/flow/*core/embed/rust/src/ui/layout_delizia/ui_firmware.rsInspect captured patch +85 / −84
diff --git a/core/embed/rust/src/ui/layout_delizia/component/address_details.rs b/core/embed/rust/src/ui/layout_delizia/component/address_details.rs
index e09a06c9..1f285a20 100644
--- a/core/embed/rust/src/ui/layout_delizia/component/address_details.rs
+++ b/core/embed/rust/src/ui/layout_delizia/component/address_details.rs
@@ -58,12 +58,12 @@ impl AddressDetails {
para.add(Paragraph::new(&theme::TEXT_MONO_GREY_LIGHT, p));
}
let result = Self {
- details: Frame::new(
+ details: Frame::with_header(
Header::left_aligned(details_title).with_cancel_button(),
para.into_paragraphs(),
)
.with_horizontal_pages(),
- xpub_view: Frame::new(
+ xpub_view: Frame::with_header(
Header::left_aligned(" \n ".into()).with_cancel_button(),
Paragraph::new(&theme::TEXT_MONO_GREY_LIGHT, "").into_paragraphs(),
)
diff --git a/core/embed/rust/src/ui/layout_delizia/component/coinjoin_progress.rs b/core/embed/rust/src/ui/layout_delizia/component/coinjoin_progress.rs
index 03935120..70de15b5 100644
--- a/core/embed/rust/src/ui/layout_delizia/component/coinjoin_progress.rs
+++ b/core/embed/rust/src/ui/layout_delizia/component/coinjoin_progress.rs
@@ -58,7 +58,7 @@ where
Ok(Self {
value: 0,
indeterminate,
- content: Frame::new(
+ content: Frame::with_header(
Header::left_aligned(TR::coinjoin__title_progress.into()),
Split::bottom(RECTANGLE_HEIGHT, 0, Empty, inner),
),
diff --git a/core/embed/rust/src/ui/layout_delizia/component/frame.rs b/core/embed/rust/src/ui/layout_delizia/component/frame.rs
index c42dfba1..e1645b09 100644
--- a/core/embed/rust/src/ui/layout_delizia/component/frame.rs
+++ b/core/embed/rust/src/ui/layout_delizia/component/frame.rs
@@ -109,7 +109,7 @@ where
T: Component + Paginate,
{
#[inline(never)]
- pub const fn new(header: Header, content: T) -> Self {
+ pub const fn with_header(header: Header, content: T) -> Self {
Self {
bounds: Rect::zero(),
content,
diff --git a/core/embed/rust/src/ui/layout_delizia/flow/confirm_action.rs b/core/embed/rust/src/ui/layout_delizia/flow/confirm_action.rs
index 07351cbb..9c7909d1 100644
--- a/core/embed/rust/src/ui/layout_delizia/flow/confirm_action.rs
+++ b/core/embed/rust/src/ui/layout_delizia/flow/confirm_action.rs
@@ -346,7 +346,7 @@ fn new_confirm_action_uni<T: Component + Paginate + MaybeTrace + 'static>(
header = header.with_subtitle(subtitle);
}
- let mut content = Frame::new(header, content)
+ let mut content = Frame::with_header(header, content)
.with_margin(options.frame_margin)
.with_swipeup_footer(strings.footer_description)
.with_vertical_pages();
@@ -455,7 +455,8 @@ fn create_menu(
menu = menu.cancel_item(menu_strings.verb_cancel);
unwrap!(menu_items.push(MENU_ITEM_CANCEL));
- let content_menu = Frame::new(Header::left_aligned("".into()).with_cancel_button(), menu);
+ let content_menu =
+ Frame::with_header(Header::left_aligned("".into()).with_cancel_button(), menu);
let content_menu = content_menu.map(move |msg| match msg {
VerticalMenuChoiceMsg::Selected(i) => {
@@ -496,7 +497,7 @@ fn create_confirm(
if let Some(subtitle) = subtitle {
header = header.with_subtitle(subtitle);
}
- let content_confirm = Frame::new(header, SwipeContent::new(prompt))
+ let content_confirm = Frame::with_header(header, SwipeContent::new(prompt))
.with_footer(prompt_action, None)
.with_swipe(Direction::Down, SwipeSettings::Default);
diff --git a/core/embed/rust/src/ui/layout_delizia/flow/confirm_fido.rs b/core/embed/rust/src/ui/layout_delizia/flow/confirm_fido.rs
index dacd30e3..8166ab75 100644
--- a/core/embed/rust/src/ui/layout_delizia/flow/confirm_fido.rs
+++ b/core/embed/rust/src/ui/layout_delizia/flow/confirm_fido.rs
@@ -104,7 +104,7 @@ pub fn new_confirm_fido(
CRED_SELECTED.store(0, Ordering::Relaxed);
let header = Header::left_aligned(title).with_menu_button();
- let content_intro = Frame::new(
+ let content_intro = Frame::with_header(
header,
SwipeContent::new(Paragraphs::new(Paragraph::new::<TString>(
&theme::TEXT_MAIN_GREY_LIGHT,
@@ -127,7 +127,7 @@ pub fn new_confirm_fido(
let header = Header::left_aligned(TR::fido__title_select_credential.into())
.with_subtitle(TR::fido__title_for_authentication.into())
.with_menu_button();
- let content_choose_credential = Frame::new(
+ let content_choose_credential = Frame::with_header(
header,
SwipeContent::new(SwipePage::vertical(PagedVerticalMenu::new(
num_accounts,
@@ -156,7 +156,7 @@ pub fn new_confirm_fido(
} else {
header.with_cancel_button()
};
- let content_details = Frame::new(
+ let content_details = Frame::with_header(
header,
SwipeContent::new(FidoCredential::new(icon_name, app_name, get_account)),
)
@@ -164,12 +164,12 @@ pub fn new_confirm_fido(
.map_to_button_msg();
let header = Header::left_aligned(title).with_menu_button();
- let content_tap = Frame::new(header, PromptScreen::new_tap_to_confirm())
+ let content_tap = Frame::with_header(header, PromptScreen::new_tap_to_confirm())
.with_footer(TR::instructions__tap_to_confirm.into(), None)
.with_swipe(Direction::Down, SwipeSettings::Default)
.map(super::util::map_to_confirm);
- let content_menu = Frame::new(
+ let content_menu = Frame::with_header(
Header::left_aligned("".into()).with_cancel_button(),
VerticalMenu::empty().cancel_item(TR::buttons__cancel.into()),
)
diff --git a/core/embed/rust/src/ui/layout_delizia/flow/confirm_firmware_update.rs b/core/embed/rust/src/ui/layout_delizia/flow/confirm_firmware_update.rs
index 0750efa5..b6760e4d 100644
--- a/core/embed/rust/src/ui/layout_delizia/flow/confirm_firmware_update.rs
+++ b/core/embed/rust/src/ui/layout_delizia/flow/confirm_firmware_update.rs
@@ -62,14 +62,14 @@ pub fn new_confirm_firmware_update(
fingerprint: TString<'static>,
) -> Result<SwipeFlow, error::Error> {
let paragraphs = Paragraphs::new(Paragraph::new(&theme::TEXT_MAIN_GREY_LIGHT, description));
- let content_intro = Frame::new(
+ let content_intro = Frame::with_header(
Header::left_aligned(TR::firmware_update__title.into()).with_menu_button(),
SwipeContent::new(paragraphs),
)
.with_swipeup_footer(None)
.map_to_button_msg();
- let content_menu = Frame::new(
+ let content_menu = Frame::with_header(
Header::left_aligned(TString::empty()).with_cancel_button(),
VerticalMenu::empty()
.item(
@@ -82,13 +82,13 @@ pub fn new_confirm_firmware_update(
let paragraphs_fingerprint =
Paragraphs::new(Paragraph::new(&theme::TEXT_MONO_GREY_LIGHT, fingerprint));
- let content_fingerprint = Frame::new(
+ let content_fingerprint = Frame::with_header(
Header::left_aligned(TR::firmware_update__title_fingerprint.into()).with_cancel_button(),
SwipeContent::new(paragraphs_fingerprint),
)
.map_to_button_msg();
- let content_confirm = Frame::new(
+ let content_confirm = Frame::with_header(
Header::left_aligned(TR::firmware_update__title.into()).with_menu_button(),
SwipeContent::new(PromptScreen::new_hold_to_confirm()),
)
diff --git a/core/embed/rust/src/ui/layout_delizia/flow/confirm_homescreen.rs b/core/embed/rust/src/ui/layout_delizia/flow/confirm_homescreen.rs
index d704cc17..fbddce80 100644
--- a/core/embed/rust/src/ui/layout_delizia/flow/confirm_homescreen.rs
+++ b/core/embed/rust/src/ui/layout_delizia/flow/confirm_homescreen.rs
@@ -53,7 +53,7 @@ pub fn new_confirm_homescreen(
title: TString<'static>,
image: CachedJpeg,
) -> Result<SwipeFlow, error::Error> {
- let content_homescreen = Frame::new(
+ let content_homescreen = Frame::with_header(
Header::left_aligned(title).with_menu_button(),
SwipeContent::new(image),
)
@@ -62,13 +62,13 @@ pub fn new_confirm_homescreen(
// Homescreen + Tap to confirm
.with_pages(|_| 2);
- let content_menu = Frame::new(
+ let content_menu = Frame::with_header(
Header::left_aligned(TString::empty()).with_cancel_button(),
VerticalMenu::empty().cancel_item(TR::buttons__cancel.into()),
)
.map(super::util::map_to_choice);
- let content_confirm = Frame::new(
+ let content_confirm = Frame::with_header(
Header::left_aligned(TR::homescreen__title_set.into()).with_menu_button(),
SwipeContent::new(PromptScreen::new_tap_to_confirm()),
)
diff --git a/core/embed/rust/src/ui/layout_delizia/flow/confirm_reset.rs b/core/embed/rust/src/ui/layout_delizia/flow/confirm_reset.rs
index d7b89901..3db93335 100644
--- a/core/embed/rust/src/ui/layout_delizia/flow/confirm_reset.rs
+++ b/core/embed/rust/src/ui/layout_delizia/flow/confirm_reset.rs
@@ -106,7 +106,7 @@ pub fn new_confirm_reset(recovery: bool) -> Result<SwipeFlow, error::Error> {
Paragraph::new(&theme::TEXT_SUB_GREY_LIGHT, TR::reset__tos_link),
])
.into_paragraphs();
- let content_intro = Frame::new(
+ let content_intro = Frame::with_header(
Header::left_aligned(title).with_menu_button(),
SwipeContent::new(paragraphs),
)
@@ -114,7 +114,7 @@ pub fn new_confirm_reset(recovery: bool) -> Result<SwipeFlow, error::Error> {
.map_to_button_msg()
.one_button_request(br);
- let content_menu = Frame::new(
+ let content_menu = Frame::with_header(
Header::left_aligned(TString::empty()).with_cancel_button(),
VerticalMenu::empty().cancel_item(cancel_btn_text),
)
@@ -126,7 +126,7 @@ pub fn new_confirm_reset(recovery: bool) -> Result<SwipeFlow, error::Error> {
.add_page(&ConfirmResetRecover::Menu, content_menu)?;
res
} else {
- let content_confirm = Frame::new(
+ let content_confirm = Frame::with_header(
Header::left_aligned(TR::reset__title_create_wallet.into()).with_menu_button(),
SwipeContent::new(PromptScreen::new_hold_to_confirm()),
)
diff --git a/core/embed/rust/src/ui/layout_delizia/flow/confirm_set_new_code.rs b/core/embed/rust/src/ui/layout_delizia/flow/confirm_set_new_code.rs
index af354e5e..aa2ea970 100644
--- a/core/embed/rust/src/ui/layout_delizia/flow/confirm_set_new_code.rs
+++ b/core/embed/rust/src/ui/layout_delizia/flow/confirm_set_new_code.rs
@@ -73,14 +73,14 @@ pub fn new_set_new_code(is_wipe_code: bool) -> Result<SwipeFlow, error::Error> {
)
};
let paragraphs = Paragraphs::new(Paragraph::new(&theme::TEXT_MAIN_GREY_LIGHT, description));
- let content_intro = Frame::new(
+ let content_intro = Frame::with_header(
Header::left_aligned(title.into()).with_menu_button(),
SwipeContent::new(paragraphs),
)
.with_swipeup_footer(None)
.map_to_button_msg();
- let content_menu = Frame::new(
+ let content_menu = Frame::with_header(
Header::left_aligned("".into()).with_cancel_button(),
VerticalMenu::empty().cancel_item(cancel_menu_item.into()),
)
@@ -98,7 +98,7 @@ pub fn new_set_new_code(is_wipe_code: bool) -> Result<SwipeFlow, error::Error> {
]
})
.into_paragraphs();
- let content_cancel_intro = Frame::new(
+ let content_cancel_intro = Frame::with_header(
Header::left_aligned(cancel.into()).with_cancel_button(),
SwipeContent::new(paragraphs_cancel_intro),
)
@@ -109,7 +109,7 @@ pub fn new_set_new_code(is_wipe_code: bool) -> Result<SwipeFlow, error::Error> {
}))
.map_to_button_msg();
- let content_cancel_confirm = Frame::new(
+ let content_cancel_confirm = Frame::with_header(
Header::left_aligned(cancel.into()).with_cancel_button(),
SwipeContent::new(PromptScreen::new_tap_to_cancel()),
)
diff --git a/core/embed/rust/src/ui/layout_delizia/flow/confirm_summary.rs b/core/embed/rust/src/ui/layout_delizia/flow/confirm_summary.rs
index 73a709f3..5358925d 100644
--- a/core/embed/rust/src/ui/layout_delizia/flow/confirm_summary.rs
+++ b/core/embed/rust/src/ui/layout_delizia/flow/confirm_summary.rs
@@ -88,7 +88,7 @@ pub fn new_confirm_summary(
.with_pages(|summary_pages| summary_pages + 1);
// Hold to confirm
- let content_hold = Frame::new(
+ let content_hold = Frame::with_header(
Header::left_aligned(TR::send__sign_transaction.into()).with_menu_button(),
SwipeContent::new(PromptScreen::new_hold_to_confirm()),
)
@@ -125,7 +125,7 @@ pub fn new_confirm_summary(
}
menu = menu.cancel_item(verb_cancel.unwrap_or(TR::send__cancel_sign.into()));
unwrap!(menu_items.push(MENU_ITEM_CANCEL));
- let content_menu = Frame::new(
+ let content_menu = Frame::with_header(
Header::left_aligned(TString::empty()).with_cancel_button(),
menu,
)
@@ -137,7 +137,7 @@ pub fn new_confirm_summary(
});
// CancelTap
- let content_cancel_tap = Frame::new(
+ let content_cancel_tap = Frame::with_header(
Header::left_aligned(TR::send__cancel_sign.into()).with_cancel_button(),
PromptScreen::new_tap_to_cancel(),
)
diff --git a/core/embed/rust/src/ui/layout_delizia/flow/continue_recovery_homepage.rs b/core/embed/rust/src/ui/layout_delizia/flow/continue_recovery_homepage.rs
index 262c724c..80f1ea76 100644
--- a/core/embed/rust/src/ui/layout_delizia/flow/continue_recovery_homepage.rs
+++ b/core/embed/rust/src/ui/layout_delizia/flow/continue_recovery_homepage.rs
@@ -175,7 +175,7 @@ pub fn new_continue_recovery_homepage(
Some(TR::instructions__enter_next_share.into())
};
- let content_main = Frame::new(
+ let content_main = Frame::with_header(
Header::left_aligned(title.into())
.with_subtitle(TR::words__instructions.into())
.with_menu_button(),
@@ -194,7 +194,7 @@ pub fn new_continue_recovery_homepage(
Paragraph::new(&theme::TEXT_WARNING, TR::recovery__progress_will_be_lost),
])
.into_paragraphs();
- let content_cancel_intro = Frame::new(
+ let content_cancel_intro = Frame::with_header(
Header::left_aligned(cancel_title.into()).with_cancel_button(),
SwipeContent::new(paragraphs_cancel),
)
@@ -205,7 +205,7 @@ pub fn new_continue_recovery_homepage(
"abort_recovery".into(),
));
- let content_cancel_confirm = Frame::new(
+ let content_cancel_confirm = Frame::with_header(
Header::left_aligned(cancel_title.into()).with_cancel_button(),
SwipeContent::new(PromptScreen::new_tap_to_cancel()),
)
@@ -214,7 +214,7 @@ pub fn new_continue_recovery_homepage(
.map(super::util::map_to_confirm);
let res = if show_instructions {
- let content_menu = Frame::new(
+ let content_menu = Frame::with_header(
Header::left_aligned(TString::empty()).with_cancel_button(),
VerticalMenu::empty().cancel_item(cancel_btn.into()),
)
@@ -225,7 +225,7 @@ pub fn new_continue_recovery_homepage(
.add_page(&ContinueRecoveryBeforeShares::Menu, content_menu)?;
res
} else if pages.is_some() {
- let content_menu = Frame::new(
+ let content_menu = Frame::with_header(
Header::left_aligned(TString::empty()).with_cancel_button(),
VerticalMenu::empty()
.item(
@@ -241,7 +241,7 @@ pub fn new_continue_recovery_homepage(
TR::recovery__more_shares_needed.into(),
);
let n_remaining_shares = pages.as_ref().unwrap().len() as u16 / 2;
- let content_remaining_shares = Frame::new(
+ let content_remaining_shares = Frame::with_header(
Header::left_aligned(TR::recovery__title_remaining_shares.into()).with_cancel_button(),
SwipeContent::new(SwipePage::vertical(pages.unwrap().into_paragraphs())),
)
@@ -278,7 +278,7 @@ pub fn new_continue_recovery_homepage(
)?;
res
} else {
- let content_menu = Frame::new(
+ let content_menu = Frame::with_header(
Header::left_aligned(TString::empty()).with_cancel_button(),
VerticalMenu::empty().cancel_item(cancel_btn.into()),
)
diff --git a/core/embed/rust/src/ui/layout_delizia/flow/prompt_backup.rs b/core/embed/rust/src/ui/layout_delizia/flow/prompt_backup.rs
index 8a7a307e..13b49a00 100644
--- a/core/embed/rust/src/ui/layout_delizia/flow/prompt_backup.rs
+++ b/core/embed/rust/src/ui/layout_delizia/flow/prompt_backup.rs
@@ -61,14 +61,14 @@ pub fn new_prompt_backup() -> Result<SwipeFlow, error::Error> {
let text_intro: TString = TR::backup__it_should_be_backed_up.into();
let paragraphs = Paragraphs::new(Paragraph::new(&theme::TEXT_MAIN_GREY_LIGHT, text_intro));
- let content_intro = Frame::new(
+ let content_intro = Frame::with_header(
Header::left_aligned(title).with_menu_button(),
SwipeContent::new(paragraphs),
)
.with_swipeup_footer(None)
.map_to_button_msg();
- let content_menu = Frame::new(
+ let content_menu = Frame::with_header(
Header::left_aligned("".into()).with_cancel_button(),
VerticalMenu::empty().cancel_item(TR::backup__title_skip.into()),
)
@@ -82,7 +82,7 @@ pub fn new_prompt_backup() -> Result<SwipeFlow, error::Error> {
),
])
.into_paragraphs();
- let content_skip_intro = Frame::new(
+ let content_skip_intro = Frame::with_header(
Header::left_aligned(TR::backup__title_skip.into()).with_cancel_button(),
SwipeContent::new(paragraphs_skip_intro),
)
@@ -90,7 +90,7 @@ pub fn new_prompt_backup() -> Result<SwipeFlow, error::Error> {
.with_swipe(Direction::Up, SwipeSettings::Default)
.map_to_button_msg();
- let content_skip_confirm = Frame::new(
+ let content_skip_confirm = Frame::with_header(
Header::left_aligned(TR::backup__title_skip.into()).with_cancel_button(),
SwipeContent::new(PromptScreen::new_tap_to_cancel()),
)
diff --git a/core/embed/rust/src/ui/layout_delizia/flow/receive.rs b/core/embed/rust/src/ui/layout_delizia/flow/receive.rs
index 85e599d5..3e267d05 100644
--- a/core/embed/rust/src/ui/layout_delizia/flow/receive.rs
+++ b/core/embed/rust/src/ui/layout_delizia/flow/receive.rs
@@ -109,7 +109,7 @@ pub fn new_receive(
extra_font: &theme::TEXT_DEMIBOLD,
}
.into_paragraphs();
- let content_address = Frame::new(
+ let content_address = Frame::with_header(
Header::left_aligned(title).with_menu_button(),
SwipeContent::new(SwipePage::vertical(paragraphs)),
)
@@ -121,7 +121,7 @@ pub fn new_receive(
.with_pages(|address_pages| address_pages + 1);
// Tap
- let content_tap = Frame::new(
+ let content_tap = Frame::with_header(
Header::left_aligned(title),
SwipeContent::new(PromptScreen::new_tap_to_confirm()),
)
@@ -130,7 +130,7 @@ pub fn new_receive(
.map(super::util::map_to_confirm);
// Menu
- let content_menu = Frame::new(
+ let content_menu = Frame::with_header(
Header::left_aligned("".into()).with_cancel_button(),
VerticalMenu::empty()
.item(theme::ICON_QR_CODE, TR::address__qr_code.into())
@@ -143,7 +143,7 @@ pub fn new_receive(
.map(super::util::map_to_choice);
// QrCode
- let content_qr = Frame::new(
+ let content_qr = Frame::with_header(
Header::left_aligned(title).with_cancel_button(),
qr.map(|s| Qr::new(s, case_sensitive))?
.with_border(QR_BORDER),
@@ -160,7 +160,7 @@ pub fn new_receive(
let content_account = ad.map(|_| Some(FlowMsg::Cancelled));
// Cancel
- let content_cancel_info = Frame::new(
+ let content_cancel_info = Frame::with_header(
Header::left_aligned(cancel_title.into()).with_cancel_button(),
SwipeContent::new(Paragraphs::new(Paragraph::new(
&theme::TEXT_MAIN_GREY_LIGHT,
@@ -171,7 +171,7 @@ pub fn new_receive(
.map_to_button_msg();
// CancelTap
- let content_cancel_tap = Frame::new(
+ let content_cancel_tap = Frame::with_header(
Header::left_aligned(cancel_title.into()).with_cancel_button(),
PromptScreen::new_tap_to_cancel(),
)
diff --git a/core/embed/rust/src/ui/layout_delizia/flow/request_number.rs b/core/embed/rust/src/ui/layout_delizia/flow/request_number.rs
index ac8f9e1a..a483aeca 100644
--- a/core/embed/rust/src/ui/layout_delizia/flow/request_number.rs
+++ b/core/embed/rust/src/ui/layout_delizia/flow/request_number.rs
@@ -79,7 +79,7 @@ pub fn new_request_number(
count as u16,
description,
)?;
- let content_number_input = Frame::new(
+ let content_number_input = Frame::with_header(
Header::left_aligned(title).with_menu_button(),
SwipeContent::new(number_input_dialog),
)
@@ -91,14 +91,14 @@ pub fn new_request_number(
}
});
- let content_menu = Frame::new(
+ let content_menu = Frame::with_header(
Header::left_aligned(TString::empty()).with_cancel_button(),
VerticalMenu::empty().item(theme::ICON_CHEVRON_RIGHT, TR::buttons__more_info.into()),
)
.map(super::util::map_to_choice);
let updatable_info = UpdatableMoreInfo::new(info_closure);
- let content_info = Frame::new(
+ let content_info = Frame::with_header(
Header::left_aligned(TString::empty()).with_cancel_button(),
SwipeContent::new(updatable_info),
)
diff --git a/core/embed/rust/src/ui/layout_delizia/flow/request_passphrase.rs b/core/embed/rust/src/ui/layout_delizia/flow/request_passphrase.rs
index ff56aba0..4de384ab 100644
--- a/core/embed/rust/src/ui/layout_delizia/flow/request_passphrase.rs
+++ b/core/embed/rust/src/ui/layout_delizia/flow/request_passphrase.rs
@@ -55,7 +55,7 @@ pub fn new_request_passphrase(
prompt_empty: TString<'static>,
max_len: usize,
) -> Result<SwipeFlow, error::Error> {
- let content_confirm_empty = Frame::new(
+ let content_confirm_empty = Frame::with_header(
Header::left_aligned(prompt_empty),
PromptScreen::new_yes_or_no(),
)
diff --git a/core/embed/rust/src/ui/layout_delizia/flow/set_brightness.rs b/core/embed/rust/src/ui/layout_delizia/flow/set_brightness.rs
index 7ea23f2e..d2b465ae 100644
--- a/core/embed/rust/src/ui/layout_delizia/flow/set_brightness.rs
+++ b/core/embed/rust/src/ui/layout_delizia/flow/set_brightness.rs
@@ -69,7 +69,7 @@ fn footer_update_fn(
}
pub fn new_set_brightness(brightness: u8) -> Result<SwipeFlow, Error> {
- let content_slider = Frame::new(
+ let content_slider = Frame::with_header(
Header::left_aligned(TR::brightness__title.into())
.with_subtitle(TR::homescreen__settings_subtitle.into())
.with_cancel_button(),
diff --git a/core/embed/rust/src/ui/layout_delizia/flow/show_danger.rs b/core/embed/rust/src/ui/layout_delizia/flow/show_danger.rs
index 96dcdb46..18c549de 100644
--- a/core/embed/rust/src/ui/layout_delizia/flow/show_danger.rs
+++ b/core/embed/rust/src/ui/layout_delizia/flow/show_danger.rs
@@ -68,7 +68,7 @@ pub fn new_show_danger(
Paragraph::new(&theme::TEXT_MAIN_GREY_EXTRA_LIGHT, value).with_top_padding(EXTRA_PADDING),
]
.into_paragraphs();
- let content_message = Frame::new(
+ let content_message = Frame::with_header(
Header::left_aligned(title).with_menu_button().with_danger(),
SwipeContent::new(paragraphs),
)
@@ -77,7 +77,7 @@ pub fn new_show_danger(
// .one_button_request(ButtonRequestCode::Warning, br_name);
// Menu
- let content_menu = Frame::new(
+ let content_menu = Frame::with_header(
Header::left_aligned("".into()).with_cancel_button(),
VerticalMenu::empty()
.item(theme::ICON_CANCEL, verb_cancel)
@@ -86,7 +86,7 @@ pub fn new_show_danger(
.map(super::util::map_to_choice);
// Cancelled
- let content_cancelled = Frame::new(
+ let content_cancelled = Frame::with_header(
Header::left_aligned(TR::words__title_done.into())
.with_result_icon(theme::ICON_BULLET_CHECKMARK, theme::GREY_DARK),
StatusScreen::new_neutral_timeout(done_title),
diff --git a/core/embed/rust/src/ui/layout_delizia/flow/show_share_words.rs b/core/embed/rust/src/ui/layout_delizia/flow/show_share_words.rs
index 83108b51..73385f1a 100644
--- a/core/embed/rust/src/ui/layout_delizia/flow/show_share_words.rs
+++ b/core/embed/rust/src/ui/layout_delizia/flow/show_share_words.rs
@@ -88,7 +88,7 @@ pub fn new_show_share_words(
let paragraphs_spacing = 8;
let title = TR::reset__recovery_wallet_backup_title.into();
- let content_instruction = Frame::new(
+ let content_instruction = Frame::with_header(
Header::left_aligned(title).with_subtitle(TR::words__instructions.into()),
SwipeContent::new(
instructions_paragraphs
@@ -101,7 +101,7 @@ pub fn new_show_share_words(
.one_button_request(ButtonRequestCode::ResetDevice.with_name("share_words"))
.with_pages(move |_| nwords + 2);
- let content_words = Frame::new(
+ let content_words = Frame::with_header(
Header::left_aligned(title).with_subtitle(subtitle),
InternallySwipableContent::new(ShareWords::new(share_words_vec, subtitle)),
)
@@ -113,7 +113,7 @@ pub fn new_show_share_words(
.register_footer_update_fn(footer_updating_func)
.map_to_button_msg();
- let content_confirm = Frame::new(
+ let content_confirm = Frame::with_header(
Header::left_aligned(text_confirm),
SwipeContent::new(PromptScreen::new_hold_to_confirm()),
)
@@ -121,7 +121,7 @@ pub fn new_show_share_words(
.with_swipe(Direction::Down, SwipeSettings::Default)
.map(|_| Some(FlowMsg::Confirmed));
- let content_check_backup_intro = Frame::new(
+ let content_check_backup_intro = Frame::with_header(
Header::left_aligned(TR::reset__check_wallet_backup_title.into()),
SwipeContent::new(Paragraphs::new(Paragraph::new(
&theme::TEXT_MAIN_GREY_LIGHT,
diff --git a/core/embed/rust/src/ui/layout_delizia/flow/show_tutorial.rs b/core/embed/rust/src/ui/layout_delizia/flow/show_tutorial.rs
index 1f645d3f..a03428a7 100644
--- a/core/embed/rust/src/ui/layout_delizia/flow/show_tutorial.rs
+++ b/core/embed/rust/src/ui/layout_delizia/flow/show_tutorial.rs
@@ -69,14 +69,14 @@ impl FlowController for ShowTutorial {
}
pub fn new_show_tutorial() -> Result<SwipeFlow, error::Error> {
- let content_step_welcome = Frame::new(
+ let content_step_welcome = Frame::with_header(
Header::left_aligned(TR::tutorial__welcome_safe5.into()),
SwipeContent::new(PromptScreen::new_tap_to_start()),
)
.with_footer(TR::instructions__tap_to_continue.into(), None)
.map(super::util::map_to_confirm);
- let content_step_begin = Frame::new(
+ let content_step_begin = Frame::with_header(
Header::left_aligned(TR::tutorial__title_lets_begin.into()),
SwipeContent::new(Paragraphs::new(Paragraph::new(
&theme::TEXT_MAIN_GREY_LIGHT,
@@ -86,7 +86,7 @@ pub fn new_show_tutorial() -> Result<SwipeFlow, error::Error> {
.with_swipeup_footer(None)
.map_to_button_msg();
- let content_step_navigation = Frame::new(
+ let content_step_navigation = Frame::with_header(
Header::left_aligned(TR::tutorial__title_easy_navigation.into()),
SwipeContent::new(Paragraphs::new(Paragraph::new(
&theme::TEXT_MAIN_GREY_LIGHT,
@@ -97,7 +97,7 @@ pub fn new_show_tutorial() -> Result<SwipeFlow, error::Error> {
.with_swipe(Direction::Down, SwipeSettings::Default)
.map_to_button_msg();
- let content_step_menu = Frame::new(
+ let content_step_menu = Frame::with_header(
Header::left_aligned(TR::tutorial__title_handy_menu.into())
.with_menu_button()
.button_styled(theme::button_warning_low()),
@@ -110,7 +110,7 @@ pub fn new_show_tutorial() -> Result<SwipeFlow, error::Error> {
.with_swipe(Direction::Down, SwipeSettings::Default)
.map_to_button_msg();
- let content_step_hold = Frame::new(
+ let content_step_hold = Frame::with_header(
Header::left_aligned(TR::tutorial__title_hold.into()),
SwipeContent::new(PromptScreen::new_hold_to_confirm()),
)
@@ -118,7 +118,7 @@ pub fn new_show_tutorial() -> Result<SwipeFlow, error::Error> {
.with_swipe(Direction::Down, SwipeSettings::Default)
.map(super::util::map_to_confirm);
- let content_step_done = Frame::new(
+ let content_step_done = Frame::with_header(
Header::left_aligned(TR::tutorial__title_well_done.into()),
SwipeContent::new(Paragraphs::new(Paragraph::new(
&theme::TEXT_MAIN_GREY_LIGHT,
@@ -128,7 +128,7 @@ pub fn new_show_tutorial() -> Result<SwipeFlow, error::Error> {
.with_swipeup_footer(None)
.map_to_button_msg();
- let content_menu = Frame::new(
+ let content_menu = Frame::with_header(
Header::left_aligned("".into()).with_cancel_button(),
VerticalMenu::empty()
.item(theme::ICON_CHEVRON_RIGHT, TR::tutorial__did_you_know.into())
@@ -137,7 +137,7 @@ pub fn new_show_tutorial() -> Result<SwipeFlow, error::Error> {
)
.map(super::util::map_to_choice);
- let content_did_you_know = Frame::new(
+ let content_did_you_know = Frame::with_header(
Header::left_aligned("".into()).with_cancel_button(),
SwipeContent::new(Paragraphs::new(Paragraph::new(
&theme::TEXT_MAIN_GREY_LIGHT,
@@ -146,7 +146,7 @@ pub fn new_show_tutorial() -> Result<SwipeFlow, error::Error> {
)
.map_to_button_msg();
- let content_hold_to_exit = Frame::new(
+ let content_hold_to_exit = Frame::with_header(
Header::left_aligned(TR::tutorial__title_hold.into()),
SwipeContent::new(PromptScreen::new_hold_to_confirm_danger()),
)
diff --git a/core/embed/rust/src/ui/layout_delizia/flow/util.rs b/core/embed/rust/src/ui/layout_delizia/flow/util.rs
index 74754785..51ce6e35 100644
--- a/core/embed/rust/src/ui/layout_delizia/flow/util.rs
+++ b/core/embed/rust/src/ui/layout_delizia/flow/util.rs
@@ -222,7 +222,7 @@ impl ConfirmValue {
header = header.with_cancel_button();
}
let page = SwipeContent::new(SwipePage::vertical(paragraphs));
- let mut frame = Frame::new(header, page);
+ let mut frame = Frame::with_header(header, page);
if let Some(instruction) = self.footer_instruction {
frame = frame.with_footer(instruction, self.footer_description);
}
@@ -417,7 +417,7 @@ impl ShowInfoParams {
header = header.with_menu_button()
}
- let mut frame = Frame::new(
+ let mut frame = Frame::with_header(
header,
SwipeContent::new(SwipePage::vertical(paragraphs.into_paragraphs())),
);
@@ -494,7 +494,7 @@ where
}
pub fn dummy_page() -> impl Component<Msg = FlowMsg> + Swipable + MaybeTrace {
- Frame::new(
+ Frame::with_header(
Header::left_aligned(TString::empty()),
VerticalMenu::empty(),
)
diff --git a/core/embed/rust/src/ui/layout_delizia/ui_firmware.rs b/core/embed/rust/src/ui/layout_delizia/ui_firmware.rs
index a4567758..cb773259 100644
--- a/core/embed/rust/src/ui/layout_delizia/ui_firmware.rs
+++ b/core/embed/rust/src/ui/layout_delizia/ui_firmware.rs
@@ -361,7 +361,7 @@ impl FirmwareUI for UIDelizia {
.into_paragraphs();
let layout = RootComponent::new(SwipeUpScreen::new(
- Frame::new(
+ Frame::with_header(
Header::left_aligned(TR::modify_amount__title.into()).with_cancel_button(),
paragraphs,
)
@@ -727,7 +727,7 @@ impl FirmwareUI for UIDelizia {
unwrap!(menu_items.push(VerticalMenuItem::Item(text)));
}
let menu = ScrolledVerticalMenu::new(menu_items, current);
- let frame = Frame::new(
+ let frame = Frame::with_header(
Header::left_aligned(TString::empty()).with_cancel_button(),
menu,
);
@@ -752,7 +752,7 @@ impl FirmwareUI for UIDelizia {
words: [TString<'static>; MAX_WORD_QUIZ_ITEMS],
) -> Result<impl LayoutMaybeTrace, Error> {
let content = VerticalMenu::select_word(words);
- let layout = RootComponent::new(Frame::new(
+ let layout = RootComponent::new(Frame::with_header(
Header::left_aligned(title).with_subtitle(description),
content,
));
@@ -767,7 +767,7 @@ impl FirmwareUI for UIDelizia {
SelectWordCountLayout::LAYOUT_ALL
},
);
- let layout = RootComponent::new(Frame::new(
+ let layout = RootComponent::new(Frame::with_header(
Header::left_aligned(TR::recovery__num_of_words.into()),
selector,
));
@@ -834,7 +834,7 @@ impl FirmwareUI for UIDelizia {
.with_done_offset(theme::CHECKLIST_DONE_OFFSET);
let layout = RootComponent::new(SwipeUpScreen::new(
- Frame::new(
+ Frame::with_header(
Header::left_aligned(title),
SwipeContent::new(checklist_content),
)
@@ -863,7 +863,7 @@ impl FirmwareUI for UIDelizia {
) -> Result<Gc<LayoutObj>, Error> {
let content = Paragraphs::new(Paragraph::new(&theme::TEXT_MAIN_GREY_LIGHT, description));
let frame = if allow_cancel {
- Frame::new(
+ Frame::with_header(
Header::left_aligned(title)
.with_cancel_button()
.with_danger(),
@@ -871,7 +871,7 @@ impl FirmwareUI for UIDelizia {
)
.with_swipeup_footer(None)
} else {
- Frame::new(
+ Frame::with_header(
Header::left_aligned(title).with_danger(),
SwipeContent::new(content),
)
@@ -895,7 +895,7 @@ impl FirmwareUI for UIDelizia {
.with_placement(geometry::LinearPlacement::vertical().align_at_center());
let layout = RootComponent::new(SwipeUpScreen::new(
- Frame::new(
+ Frame::with_header(
Header::left_aligned("".into()),
SwipeContent::new(paragraphs),
)
@@ -1000,7 +1000,7 @@ impl FirmwareUI for UIDelizia {
}
let content = Paragraphs::new(Paragraph::new(&theme::TEXT_MAIN_GREY_LIGHT, description));
let obj = LayoutObj::new(SwipeUpScreen::new(
- Frame::new(Header::left_aligned(title), SwipeContent::new(content))
+ Frame::with_header(Header::left_aligned(title), SwipeContent::new(content))
.with_swipeup_footer(None),
))?;
Ok(obj)
@@ -1026,7 +1026,7 @@ impl FirmwareUI for UIDelizia {
}
}
- let layout = RootComponent::new(SwipeUpScreen::new(Frame::new(
+ let layout = RootComponent::new(SwipeUpScreen::new(Frame::with_header(
Header::left_aligned(title).with_cancel_button(),
SwipeContent::new(paragraphs.into_paragraphs()),
)));
@@ -1054,7 +1054,7 @@ impl FirmwareUI for UIDelizia {
.into_paragraphs();
let layout = RootComponent::new(SwipeUpScreen::new(
- Frame::new(
+ Frame::with_header(
Header::left_aligned(title).with_cancel_button(),
SwipeContent::new(paragraphs),
)
@@ -1215,7 +1215,7 @@ impl FirmwareUI for UIDelizia {
StatusScreen::new_success(title)
};
let layout = LayoutObj::new(SwipeUpScreen::new(
- Frame::new(
+ Frame::with_header(
Header::left_aligned(TR::words__title_success.into())
.with_result_icon(theme::ICON_BULLET_CHECKMARK, theme::GREEN_LIGHT),
SwipeContent::new(content).with_no_attach_anim(),
@@ -1257,7 +1257,7 @@ impl FirmwareUI for UIDelizia {
} else {
header.with_warning_low_icon()
};
- let frame = Frame::new(header, SwipeContent::new(content));
+ let frame = Frame::with_header(header, SwipeContent::new(content));
let frame = if danger {
frame.with_tap_footer(action)
} else {
@@ -1268,7 +1268,7 @@ impl FirmwareUI for UIDelizia {
fn confirm_cancel() -> Result<impl LayoutMaybeTrace, Error> {
Ok(RootComponent::new(
- Frame::new(
+ Frame::with_header(
Header::left_aligned(TR::send__cancel_sign.into()).with_cancel_button(),
SwipeContent::new(PromptScreen::new_tap_to_cancel()),
)
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.