chore(core/delizia): remove unused border
What changed, and why it matters
This is a routine cleanup change that removes an unused visual border feature from the Trezor firmware's Delizia user interface. It does not change any security-sensitive behavior; it only simplifies the code by deleting a function that always returned zero-width borders and updating two places that called it to no longer use a border wrapper.
No security action required. Treat as normal code cleanup.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit deletes the borders() theme helper (which returned Insets::new(0,0,0,0)) and removes its two call sites: the Progress component now uses the full screen area directly, and a firmware UI helper now wraps paragraphs without a Border. The Border import is also removed. The change is purely cosmetic/refactoring with no functional or security effect.
Changed components
core/embed/rust/src/ui/layout_delizia/component/progress.rscore/embed/rust/src/ui/layout_delizia/theme/mod.rscore/embed/rust/src/ui/layout_delizia/ui_firmware.rsInspect captured patch +3 / −17
diff --git a/core/embed/rust/src/ui/layout_delizia/component/progress.rs b/core/embed/rust/src/ui/layout_delizia/component/progress.rs
index 887f3b7e..b43ac720 100644
--- a/core/embed/rust/src/ui/layout_delizia/component/progress.rs
+++ b/core/embed/rust/src/ui/layout_delizia/component/progress.rs
@@ -30,7 +30,7 @@ pub struct Progress {
}
impl Progress {
- const AREA: Rect = constant::screen().inset(theme::borders());
+ const AREA: Rect = constant::screen();
pub fn new(
title: TString<'static>,
diff --git a/core/embed/rust/src/ui/layout_delizia/theme/mod.rs b/core/embed/rust/src/ui/layout_delizia/theme/mod.rs
index edaaf9b9..ad8373df 100644
--- a/core/embed/rust/src/ui/layout_delizia/theme/mod.rs
+++ b/core/embed/rust/src/ui/layout_delizia/theme/mod.rs
@@ -826,17 +826,6 @@ pub const fn button_bar<T>(inner: T) -> FixedHeightBar<T> {
FixedHeightBar::bottom(inner, BUTTON_HEIGHT)
}
-/// +----------+
-/// | 6 |
-/// | +----+ |
-/// | 6| | 6|
-/// | +----+ |
-/// | 6 |
-/// +----------+
-pub const fn borders() -> Insets {
- Insets::new(0, 0, 0, 0)
-}
-
pub const fn borders_notification() -> Insets {
Insets::new(42, 0, 0, 0)
}
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 9c1bc6cb..2dfbe288 100644
--- a/core/embed/rust/src/ui/layout_delizia/ui_firmware.rs
+++ b/core/embed/rust/src/ui/layout_delizia/ui_firmware.rs
@@ -18,7 +18,7 @@ use crate::{
},
TextStyle,
},
- Border, CachedJpeg, ComponentExt, Empty, FormattedText, MsgMap, Never, Timeout,
+ CachedJpeg, ComponentExt, Empty, FormattedText, MsgMap, Never, Timeout,
},
flow::FlowMsg,
geometry::{self, Direction, Offset},
@@ -1164,10 +1164,7 @@ impl FirmwareUI for UIDelizia {
_title: Option<TString<'static>>,
_button: Option<TString<'static>>,
) -> Result<Gc<LayoutObj>, Error> {
- let obj = LayoutObj::new(Border::new(
- theme::borders(),
- Paragraphs::new(Paragraph::new(&theme::TEXT_DEMIBOLD, text)),
- ))?;
+ let obj = LayoutObj::new(Paragraphs::new(Paragraph::new(&theme::TEXT_DEMIBOLD, text)))?;
Ok(obj)
}
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.