1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-06-26 01:42:34 +00:00

chore(eckhart): check button subtitle overflow

[no changelog]
This commit is contained in:
Ioan Bizău 2025-04-11 09:41:17 +02:00 committed by Ioan Bizău
parent 3f3fd4a021
commit 9d91c7a69c

View File

@ -463,6 +463,10 @@ impl Button {
});
subtext.map(|subtext| {
#[cfg(feature = "ui_debug")]
if subtext_style.text_font.text_width(subtext) > self.area.width() {
fatal_error!(&uformat!(len: 128, "Subtext too long: '{}'", subtext));
}
shape::Text::new(
render_origin(if single_line_text {
text_baseline_height / 2