feat(core/caesar): use arrow in HtC anim
What changed, and why it matters
This commit is a user-interface polish change for the Trezor hardware wallet. It replaces the text label on the 'hold to confirm' button with a small arrow icon in one product variant (Caesar), and shortens the translated button text in several languages so it fits on screen. There is no security-relevant change.
No security action required. Treat as a normal UI/UX and localization update.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch updates the Caesar layout’s hold-to-confirm (HtC) animation: it adds a new 5x5 arrow icon (arrow_right_htc), adjusts loader rendering to reserve space for the arrow, and shortens the ‘buttons__hold_to_confirm’ translation string for the Caesar layout in Czech, Spanish, French, Indonesian, and Portuguese. Translation signature metadata and UI test fixtures are regenerated accordingly. No cryptographic, authentication, or firmware logic is modified.
Changed components
core/embed/rust/src/ui/layout_caesar/component/hold_to_confirm.rscore/embed/rust/src/ui/layout_caesar/component/loader.rscore/embed/rust/src/ui/layout_caesar/res/arrow_right_htc.pngcore/embed/rust/src/ui/layout_caesar/res/arrow_right_htc.toifcore/embed/rust/src/ui/layout_caesar/theme/mod.rscore/translations/cs.jsoncore/translations/es.jsoncore/translations/fr.jsoncore/translations/id.jsoncore/translations/pt.jsoncore/translations/signatures.jsontests/ui_tests/fixtures.jsonInspect captured patch +6790 / −6767
### core/embed/rust/src/ui/layout_caesar/component/hold_to_confirm.rs
@@ -1,6 +1,6 @@
use sys::time::{Duration, Instant};
-use super::loader::{Loader, DEFAULT_DURATION_MS};
+use super::loader::{Loader, ARROW_EXTRA_WIDTH, DEFAULT_DURATION_MS};
use super::{theme, ButtonContent, ButtonDetails, LoaderMsg, LoaderStyleSheet};
use crate::ui::component::{Component, Event, EventCtx};
use crate::ui::event::ButtonEvent;
@@ -39,7 +39,7 @@ impl Component for HoldToConfirm {
type Msg = HoldToConfirmMsg;
fn place(&mut self, bounds: Rect) -> Rect {
- let button_width = self.text_width + 2 * theme::BUTTON_OUTLINE;
+ let button_width = self.text_width + 2 * theme::BUTTON_OUTLINE + ARROW_EXTRA_WIDTH;
let loader_area = bounds.split_right(button_width).1;
self.loader.place(loader_area)
}
### core/embed/rust/src/ui/layout_caesar/component/loader.rs
@@ -5,14 +5,23 @@ use crate::strutil::TString;
use crate::ui::animation::Animation;
use crate::ui::component::{Child, Component, Event, EventCtx};
use crate::ui::display::{self, Color, Font, LOADER_MAX};
-use crate::ui::geometry::{Offset, Point, Rect};
+use crate::ui::geometry::{Alignment2D, Offset, Point, Rect};
use crate::ui::shape::Renderer;
use crate::ui::util::animation_disabled;
use crate::ui::{constant, shape};
pub const DEFAULT_DURATION_MS: u32 = 1000;
pub const SHRINKING_DURATION_MS: u32 = 500;
+/// Width of the filled part with the arrow at the left side of the loader
+/// before it starts growing.
+const ARROW_FILL_WIDTH: i16 = 8;
+/// Gap between the filled part and the text.
+const ARROW_TEXT_GAP: i16 = 2;
+/// How much wider the loader is than an outlined text button, to fit the
+/// arrow in place of the left outline.
+pub const ARROW_EXTRA_WIDTH: i16 = ARROW_FILL_WIDTH + ARROW_TEXT_GAP - theme::BUTTON_OUTLINE;
+
pub enum LoaderMsg {
GrownCompletely,
ShrunkCompletely,
@@ -168,42 +177,47 @@ impl Loader {
style: &LoaderStyle,
done: i32,
) {
- let width = self.area.width();
+ // The filled part grows from the arrow to the full width, covering the text.
+ let growing_width = self.area.width() - ARROW_FILL_WIDTH;
// NOTE: need to calculate this in `i32`, it would overflow using `i16`
- let split_point = (((i32::from(width) + 1) * done) / i32::from(display::LOADER_MAX)) as i16;
- let (r_left, r_right) = self.area.split_left(split_point);
- let parts = [(r_left, true), (r_right, false)];
- parts.iter().for_each(|&(r, invert)| {
- target.in_clip(r, &|target| {
- if invert {
- shape::Bar::new(self.area)
- .with_radius(3)
- .with_bg(style.fg_color)
- .render(target);
- } else {
- shape::Bar::new(self.area)
- .with_radius(3)
- .with_fg(style.fg_color)
- .render(target);
- }
+ let fill_width = ARROW_FILL_WIDTH
+ + ((i32::from(growing_width) * done) / i32::from(display::LOADER_MAX)) as i16;
+ let (r_filled, r_outlined) = self.area.split_left(fill_width);
+
+ target.in_clip(r_filled, &|target| {
+ shape::Bar::new(self.area)
+ .with_radius(3)
+ .with_bg(style.fg_color)
+ .render(target);
+ });
- let text_color = if invert {
- style.bg_color
- } else {
- style.fg_color
- };
-
- self.get_text().map(|t| {
- let pt = Point::new(
- style.font.horz_center(self.area.x0, self.area.x1, t),
- style.font.vert_center(self.area.y0, self.area.y1, "A"),
- );
- shape::Text::new(pt, t, style.font)
- .with_fg(text_color)
- .render(target);
- });
+ target.in_clip(r_outlined, &|target| {
+ shape::Bar::new(self.area)
+ .with_radius(3)
+ .with_fg(style.fg_color)
+ .render(target);
+
+ self.get_text().map(|t| {
+ let text_x0 = self.area.x0 + ARROW_EXTRA_WIDTH;
+ let pt = Point::new(
+ style.font.horz_center(text_x0, self.area.x1, t),
+ style.font.vert_center(self.area.y0, self.area.y1, "A"),
+ );
+ shape::Text::new(pt, t, style.font)
+ .with_fg(style.fg_color)
+ .render(target);
});
});
+
+ // The arrow is moving with the right edge of the filled part, two pixels
+ // away from it (the icon has an empty column on both sides).
+ shape::ToifImage::new(
+ Point::new(r_filled.x1 - 1, self.area.center().y),
+ theme::ICON_ARROW_RIGHT_HTC.toif,
+ )
+ .with_align(Alignment2D::CENTER_RIGHT)
+ .with_fg(style.bg_color)
+ .render(target);
}
}
### core/embed/rust/src/ui/layout_caesar/res/arrow_right_htc.png
[binary or diff unavailable]
### core/embed/rust/src/ui/layout_caesar/res/arrow_right_htc.toif
[binary or diff unavailable]
### core/embed/rust/src/ui/layout_caesar/theme/mod.rs
@@ -65,6 +65,10 @@ include_icon!(
ICON_ARROW_RIGHT_FAT,
"layout_caesar/res/arrow_right_fat.toif"
); // 4*8
+include_icon!(
+ ICON_ARROW_RIGHT_HTC,
+ "layout_caesar/res/arrow_right_htc.toif"
+); // 5*5
include_icon!(ICON_ARROW_UP, "layout_caesar/res/arrow_up.toif"); // 8*4
include_icon!(ICON_ARROW_DOWN, "layout_caesar/res/arrow_down.toif"); // 7*4
include_icon!(ICON_ARROW_BACK_UP, "layout_caesar/res/arrow_back_up.toif"); // 8*8
### core/translations/cs.json
@@ -433,7 +433,12 @@
},
"buttons__format": "Formátovat",
"buttons__go_back": "Jít zpět",
- "buttons__hold_to_confirm": "Potvrdit podržením",
+ "buttons__hold_to_confirm": {
+ "Bolt": "Potvrdit podržením",
+ "Caesar": "Potvrdit",
+ "Delizia": "Potvrdit podržením",
+ "Eckhart": "Potvrdit podržením"
+ },
"buttons__info": "Informace",
"buttons__install": "Nainstalovat",
"buttons__more_info": "Další informace",
### core/translations/es.json
@@ -440,7 +440,7 @@
"buttons__go_back": "Atrás",
"buttons__hold_to_confirm": {
"Bolt": "Mantén para confirmar",
- "Caesar": "Mantén p/ confirmar",
+ "Caesar": "Confirmar",
"Delizia": "Mantén para confirmar",
"Eckhart": "Mantén para confirmar"
},
### core/translations/fr.json
@@ -520,7 +520,7 @@
"buttons__go_back": "Retour",
"buttons__hold_to_confirm": {
"Bolt": "Maintenez pour confirmer",
- "Caesar": "Maintenez pr conf.",
+ "Caesar": "Confirmer",
"Delizia": "Maintenez pour confirmer",
"Eckhart": "Maintenez pour confirmer"
},
### core/translations/id.json
@@ -414,7 +414,7 @@
"buttons__go_back": "Kembali",
"buttons__hold_to_confirm": {
"Bolt": "Tahan untuk konfirmasi",
- "Caesar": "Tahan, konfirmasi",
+ "Caesar": "Konfirmasi",
"Delizia": "Tahan untuk konfirmasi",
"Eckhart": "Tahan untuk konfirmasi"
},
### core/translations/pt.json
@@ -455,7 +455,7 @@
"buttons__go_back": "Voltar",
"buttons__hold_to_confirm": {
"Bolt": "Segure para confirmar",
- "Caesar": "Segure p/ confirmar",
+ "Caesar": "Confirmar",
"Delizia": "Segure para confirmar",
"Eckhart": "Segure para confirmar"
},
### core/translations/signatures.json
@@ -1,8 +1,8 @@
{
"current": {
- "merkle_root": "25d902138dae771cf6a532dc61b43dcf368c38c01de993c7c9e5e6dcfffb91a4",
- "datetime": "2026-11-20T11:04:13.396382+00:00",
- "commit": "bf630c0b2adb2d4515e08403655536dba26568f0"
+ "merkle_root": "5a1e094a902a4c5bc95417c450b706696da931d29eedb4591051647c26d5aefb",
+ "datetime": "2026-11-25T14:48:05.981111+00:00",
+ "commit": "0a5964c0c08697c708d63f8b2f0ea4a25535bfc2"
},
"history": [
{
### tests/ui_tests/fixtures.json
[binary or diff unavailable]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.