feat(core/eckhart): remove soc from homescreen
What changed, and why it matters
This is a small user-interface change for the Trezor hardware wallet's homescreen. It removes the battery percentage number (state-of-charge, or 'SoC') from the homescreen and instead shows only a battery icon. The code renames an internal mode from 'OnChargingChangeOrAttach' to 'HomescreenBar' and adjusts how the battery icon is drawn. There is no security-relevant behavior change visible in the diff.
No security action needed. Treat as a normal UI/UX change.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit modifies the Eckhart layout’s fuel-gauge component and homescreen. It renames FuelGaugeMode::OnChargingChangeOrAttach to HomescreenBar and the constructor on_charging_change_or_attach() to homescreen_bar(). The Homescreen now uses FuelGauge::homescreen_bar() with centered alignment and a medium font. The HomescreenBar render branch draws only the battery icon centered, omitting the textual percentage. A constant LOCK_HOLD_DURATION is removed as unused. No logic affecting secrets, keys, authentication, communication, or memory safety is present.
Changed components
core/embed/rust/src/ui/layout_eckhart/component/fuel_gauge.rscore/embed/rust/src/ui/layout_eckhart/firmware/homescreen.rsInspect captured patch +19 / −14
diff --git a/core/embed/rust/src/ui/layout_eckhart/component/fuel_gauge.rs b/core/embed/rust/src/ui/layout_eckhart/component/fuel_gauge.rs
index ce35aa8e..08d6c6bc 100644
--- a/core/embed/rust/src/ui/layout_eckhart/component/fuel_gauge.rs
+++ b/core/embed/rust/src/ui/layout_eckhart/component/fuel_gauge.rs
@@ -50,9 +50,9 @@ pub enum FuelGaugeMode {
/// Show the fuel gauge only when charging state changes
#[cfg(feature = "micropython")]
OnChargingChange(Timer),
- /// Show the fuel gauge when charging state changes or when attached
+ /// Show only icon when charging state changes or when attached
#[cfg(feature = "micropython")]
- OnChargingChangeOrAttach(Timer),
+ HomescreenBar(Timer),
}
impl FuelGauge {
@@ -70,8 +70,8 @@ impl FuelGauge {
}
#[cfg(feature = "micropython")]
- pub const fn on_charging_change_or_attach() -> Self {
- Self::new(FuelGaugeMode::OnChargingChangeOrAttach(Timer::new()))
+ pub const fn homescreen_bar() -> Self {
+ Self::new(FuelGaugeMode::HomescreenBar(Timer::new()))
}
pub const fn with_alignment(mut self, alignment: Alignment) -> Self {
@@ -94,8 +94,9 @@ impl FuelGauge {
FuelGaugeMode::Always => true,
FuelGaugeMode::ChargingIconOnly => self.charging_state == ChargingState::Charging,
#[cfg(feature = "micropython")]
- FuelGaugeMode::OnChargingChange(timer)
- | FuelGaugeMode::OnChargingChangeOrAttach(timer) => timer.is_running(),
+ FuelGaugeMode::OnChargingChange(timer) | FuelGaugeMode::HomescreenBar(timer) => {
+ timer.is_running()
+ }
}
}
@@ -157,7 +158,7 @@ impl Component for FuelGauge {
self.update_pm_state();
}
#[cfg(feature = "micropython")]
- if let FuelGaugeMode::OnChargingChangeOrAttach(timer) = &mut self.mode {
+ if let FuelGaugeMode::HomescreenBar(timer) = &mut self.mode {
if !animation_disabled() {
timer.start(ctx, FUEL_GAUGE_DURATION.into());
}
@@ -177,7 +178,7 @@ impl Component for FuelGauge {
}
#[cfg(feature = "micropython")]
FuelGaugeMode::OnChargingChange(timer)
- | FuelGaugeMode::OnChargingChangeOrAttach(timer) => {
+ | FuelGaugeMode::HomescreenBar(timer) => {
if _e.charging_status_changed {
timer.start(ctx, FUEL_GAUGE_DURATION.into());
ctx.request_paint();
@@ -187,8 +188,7 @@ impl Component for FuelGauge {
}
#[cfg(feature = "micropython")]
Event::Timer(_) => match &mut self.mode {
- FuelGaugeMode::OnChargingChange(timer)
- | FuelGaugeMode::OnChargingChangeOrAttach(timer) => {
+ FuelGaugeMode::OnChargingChange(timer) | FuelGaugeMode::HomescreenBar(timer) => {
if timer.expire(event) {
ctx.request_paint();
}
@@ -241,6 +241,13 @@ impl Component for FuelGauge {
.render(target);
}
}
+ #[cfg(feature = "micropython")]
+ FuelGaugeMode::HomescreenBar(_) => {
+ shape::ToifImage::new(area.center(), icon.toif)
+ .with_fg(color_icon)
+ .with_align(Alignment2D::CENTER)
+ .render(target);
+ }
_ => {
shape::ToifImage::new(area.left_center(), icon.toif)
.with_fg(color_icon)
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 9a33cb27..d22f854d 100644
--- a/core/embed/rust/src/ui/layout_eckhart/firmware/homescreen.rs
+++ b/core/embed/rust/src/ui/layout_eckhart/firmware/homescreen.rs
@@ -19,7 +19,7 @@ use crate::{
use super::{
super::{
- component::{Button, ButtonContent, ButtonMsg, FuelGauge},
+ component::{Button, ButtonContent, FuelGauge},
fonts,
},
constant::{HEIGHT, SCREEN, WIDTH},
@@ -27,8 +27,6 @@ use super::{
ActionBar, ActionBarMsg, Hint,
};
-const LOCK_HOLD_DURATION: ShortDuration = ShortDuration::from_millis(3000);
-
/// Full-screen component for the homescreen and lockscreen.
pub struct Homescreen {
/// Device name with shadow
@@ -103,7 +101,7 @@ impl Homescreen {
led_color,
locked,
bootscreen,
- fuel_gauge: FuelGauge::on_charging_change_or_attach()
+ fuel_gauge: FuelGauge::homescreen_bar()
.with_alignment(Alignment::Center)
.with_font(fonts::FONT_SATOSHI_MEDIUM_26),
swipe: Swipe::new().up(),
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.