feat(eckhart): fix some misalignment issues
What changed, and why it matters
This commit makes small visual adjustments to the Trezor hardware wallet's homescreen layout. It tweaks pixel alignment of status icons and fixes how a shadow behind a scrolling label moves during animation. There is no security-relevant change.
No security action required. Treat as a normal UI polish commit.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The change is confined to UI layout/rendering code in core/embed/rust/src/ui/layout_eckhart/firmware/homescreen.rs. It adds a 1-pixel vertical translation to visually align the connection indicator with the fuel gauge icon, and introduces a hide_progress() helper so the label’s pill-shaped shadow tracks the label’s animated horizontal position correctly. No cryptographic, input-validation, memory-safety, or trust-boundary changes are present.
Changed components
core/embed/rust/src/ui/layout_eckhart/firmware/homescreen.rsInspect captured patch +21 / −2
diff --git a/core/embed/rust/src/ui/layout_eckhart/firmware/homescreen.rs b/core/embed/rust/src/ui/layout_eckhart/firmware/homescreen.rs
index e44a8e1a..00d6e84e 100644
--- a/core/embed/rust/src/ui/layout_eckhart/firmware/homescreen.rs
+++ b/core/embed/rust/src/ui/layout_eckhart/firmware/homescreen.rs
@@ -382,7 +382,9 @@ impl Component for HomescreenHeader {
Offset::uniform(ConnectionIndicator::AREA_SIZE_NEEDED),
Alignment2D::CENTER_LEFT,
)
- .translate(Offset::x(Self::SUBCOMPONENTS_GAP));
+ .translate(Offset::x(Self::SUBCOMPONENTS_GAP))
+ // Visually align with the fuel gauge icon
+ .translate(Offset::y(-1));
self.fuel_gauge.place(fuel_gauge_area);
self.connection_indicator.place(connection_indicator_area);
@@ -443,8 +445,14 @@ impl Component for HomescreenHeader {
if self.show_indicators {
if let Some(animation) = &self.label_anim {
let x_offset = animation.eval_offset();
+ let shadow_offset = x_offset
+ + Offset::x(i16::lerp(
+ 0,
+ -Self::SUBCOMPONENTS_GAP,
+ animation.hide_progress(),
+ ));
if self.background_image {
- target.with_origin(x_offset, &|target| {
+ target.with_origin(shadow_offset, &|target| {
render_pill_shaped_background(self.label_shadow_area, target);
});
}
@@ -568,6 +576,17 @@ impl ShowLabelAnimation {
Offset::x(i16::lerp(-self.label_width, 0, pos))
}
+ /// Returns 0.0 when label is fully visible, 1.0 when fully hidden.
+ pub fn hide_progress(&self) -> f32 {
+ if animation_disabled() || !self.animated {
+ if self.hidden && !self.animating {
+ return 1.0;
+ }
+ return 0.0;
+ }
+ 1.0 - self.eval()
+ }
+
pub fn process_event(&mut self, ctx: &mut EventCtx, event: Event) {
match event {
Event::Attach(_) => {
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.