chore(core/eckhart): update chunkfied text style
What changed, and why it matters
This is a routine user-interface styling update for the Trezor hardware wallet's newer 'Eckhart' screen layout. It changes how long text (such as cryptocurrency addresses) is broken into chunks and how pagination hints are shown. There is no indication of any security bug or vulnerability being fixed.
No security action required; treat as normal UI maintenance.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit refactors chunkified text styling in the Rust UI layer for the Eckhart layout. It replaces a dynamic helper get_chunkified_text_style(len) with a single static style TEXT_MONO_ADDRESS_CHUNKS, tweaks chunk sizes and line spacing, adds ellipsis page-breaking to several text styles, and switches some screens from a manual page-counter hint to a generic pagination hint. The changes are purely presentational.
Changed components
core/embed/rust/src/ui/layout_eckhart/flow/confirm_output.rscore/embed/rust/src/ui/layout_eckhart/flow/receive.rscore/embed/rust/src/ui/layout_eckhart/theme/firmware.rscore/embed/rust/src/ui/layout_eckhart/ui_firmware.rsInspect captured patch +23 / −18
diff --git a/core/embed/rust/src/ui/layout_eckhart/flow/confirm_output.rs b/core/embed/rust/src/ui/layout_eckhart/flow/confirm_output.rs
index c5a89858..77f7ea37 100644
--- a/core/embed/rust/src/ui/layout_eckhart/flow/confirm_output.rs
+++ b/core/embed/rust/src/ui/layout_eckhart/flow/confirm_output.rs
@@ -287,10 +287,11 @@ pub fn new_confirm_output(
LinearPlacement::vertical().with_spacing(theme::TEXT_VERTICAL_SPACING),
))
.with_header(Header::new(title.unwrap_or(TString::empty())).with_menu_button())
+ .with_subtitle(subtitle.unwrap_or(TString::empty()))
+ .with_pagination_hint()
.with_action_bar(ActionBar::new_single(Button::with_text(
TR::buttons__continue.into(),
)))
- .with_subtitle(subtitle.unwrap_or(TString::empty()))
.map(|msg| match msg {
TextScreenMsg::Confirmed => Some(FlowMsg::Confirmed),
TextScreenMsg::Cancelled => Some(FlowMsg::Cancelled),
diff --git a/core/embed/rust/src/ui/layout_eckhart/flow/receive.rs b/core/embed/rust/src/ui/layout_eckhart/flow/receive.rs
index 93da62fd..b29f600e 100644
--- a/core/embed/rust/src/ui/layout_eckhart/flow/receive.rs
+++ b/core/embed/rust/src/ui/layout_eckhart/flow/receive.rs
@@ -98,7 +98,7 @@ pub fn new_receive(
};
let text_style = if chunkify {
- theme::get_chunkified_text_style(content.len())
+ &theme::TEXT_MONO_ADDRESS_CHUNKS
} else {
&theme::TEXT_MONO_ADDRESS
};
diff --git a/core/embed/rust/src/ui/layout_eckhart/theme/firmware.rs b/core/embed/rust/src/ui/layout_eckhart/theme/firmware.rs
index e4be3e7e..4f0540a2 100644
--- a/core/embed/rust/src/ui/layout_eckhart/theme/firmware.rs
+++ b/core/embed/rust/src/ui/layout_eckhart/theme/firmware.rs
@@ -47,6 +47,9 @@ pub const TEXT_BIG: TextStyle = TextStyle::new(
/// TT Satoshi Regular - 38 (Screen text, Menu item label)
pub const TEXT_REGULAR: TextStyle =
TextStyle::new(fonts::FONT_SATOSHI_REGULAR_38, GREY_LIGHT, BG, GREY, GREY);
+pub const TEXT_REGULAR_ELLIPSIS: TextStyle = TEXT_REGULAR
+ .with_line_breaking(LineBreaking::BreakWordsNoHyphen)
+ .with_page_breaking(PageBreaking::CutAndInsertEllipsisBoth);
/// TT Satoshi Medium - 26 (Screen text, Button label, Input value)
pub const TEXT_MEDIUM: TextStyle =
TextStyle::new(fonts::FONT_SATOSHI_MEDIUM_26, GREY_LIGHT, BG, GREY, GREY);
@@ -85,16 +88,23 @@ pub const TEXT_MONO_MEDIUM: TextStyle = TextStyle::new(
pub const TEXT_MONO_MEDIUM_LIGHT: TextStyle =
TextStyle::new(fonts::FONT_MONO_MEDIUM_38, GREY_LIGHT, BG, GREY, GREY)
- .with_line_breaking(LineBreaking::BreakAtWhitespace);
+ .with_line_breaking(LineBreaking::BreakAtWhitespace)
+ .with_page_breaking(PageBreaking::CutAndInsertEllipsisBoth);
-pub const TEXT_MONO_MEDIUM_LIGHT_DATA: TextStyle =
- TEXT_MONO_MEDIUM_LIGHT.with_line_breaking(LineBreaking::BreakWordsNoHyphen);
+pub const TEXT_MONO_MEDIUM_LIGHT_DATA: TextStyle = TEXT_MONO_MEDIUM_LIGHT
+ .with_line_breaking(LineBreaking::BreakWordsNoHyphen)
+ .with_page_breaking(PageBreaking::CutAndInsertEllipsisBoth);
/// Roboto Mono Light - 30 (Address, data)
pub const TEXT_MONO_LIGHT: TextStyle =
TextStyle::new(fonts::FONT_MONO_LIGHT_30, GREY_LIGHT, BG, GREY, GREY)
.with_line_breaking(LineBreaking::BreakWordsNoHyphen);
+pub const TEXT_MONO_LIGHT_ELLIPSIS: TextStyle =
+ TextStyle::new(fonts::FONT_MONO_LIGHT_30, GREY_LIGHT, BG, GREY, GREY)
+ .with_line_breaking(LineBreaking::BreakWordsNoHyphen)
+ .with_page_breaking(PageBreaking::CutAndInsertEllipsisBoth);
+
pub const TEXT_REGULAR_WARNING: TextStyle =
TextStyle::new(fonts::FONT_SATOSHI_REGULAR_38, RED, BG, FG, FG);
@@ -113,18 +123,14 @@ pub const TEXT_SMALL_LIGHT: TextStyle =
/// Makes sure that the displayed text (usually address) will get divided into
/// smaller chunks.
pub const TEXT_MONO_ADDRESS_CHUNKS: TextStyle = TEXT_MONO_LIGHT
- .with_chunks(Chunks::new(4, 8))
- .with_line_spacing(24);
+ .with_chunks(Chunks::new(4, 13).with_max_rows(5))
+ .with_line_spacing(22)
+ .with_page_breaking(PageBreaking::CutAndInsertEllipsisBoth);
pub const TEXT_MONO_ADDRESS: TextStyle = TEXT_MONO_LIGHT
.with_line_breaking(LineBreaking::BreakWordsNoHyphen)
.with_page_breaking(PageBreaking::CutAndInsertEllipsisBoth);
-/// Decide the text style of chunkified text according to its length.
-pub fn get_chunkified_text_style(_character_length: usize) -> &'static TextStyle {
- &TEXT_MONO_ADDRESS_CHUNKS
-}
-
pub const TEXT_MONO_EXTRA_LIGHT: TextStyle = TextStyle::new(
fonts::FONT_MONO_LIGHT_30,
GREY_EXTRA_LIGHT,
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 bae488d0..4eba7684 100644
--- a/core/embed/rust/src/ui/layout_eckhart/ui_firmware.rs
+++ b/core/embed/rust/src/ui/layout_eckhart/ui_firmware.rs
@@ -467,8 +467,7 @@ impl FirmwareUI for UIEckhart {
StrOrBytes::Str("".into())
},
font: if chunkify {
- let value: TString = value.try_into()?;
- theme::get_chunkified_text_style(value.len())
+ &theme::TEXT_MONO_ADDRESS_CHUNKS
} else if is_data {
&theme::TEXT_MONO_ADDRESS
} else {
@@ -517,9 +516,8 @@ impl FirmwareUI for UIEckhart {
.with_subtitle(subtitle.unwrap_or(TString::empty()))
.with_action_bar(action_bar);
if page_counter {
- screen = screen.with_hint(Hint::new_page_counter());
- }
- if let Some(warning_footer) = warning_footer {
+ screen = screen.with_pagination_hint();
+ } else if let Some(warning_footer) = warning_footer {
screen = screen.with_hint(Hint::new_warning_caution(warning_footer));
}
LayoutObj::new(screen)
@@ -676,7 +674,7 @@ impl FirmwareUI for UIEckhart {
let font = if chunkify {
&theme::TEXT_MONO_ADDRESS_CHUNKS
} else if text_mono {
- &theme::TEXT_MONO_LIGHT
+ &theme::TEXT_MONO_LIGHT_ELLIPSIS
} else {
&theme::TEXT_REGULAR
};
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.