mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-06-26 09:52:34 +00:00
chore(eckhart): check button subtitle overflow
[no changelog]
This commit is contained in:
parent
3f3fd4a021
commit
9d91c7a69c
@ -463,6 +463,10 @@ impl Button {
|
|||||||
});
|
});
|
||||||
|
|
||||||
subtext.map(|subtext| {
|
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(
|
shape::Text::new(
|
||||||
render_origin(if single_line_text {
|
render_origin(if single_line_text {
|
||||||
text_baseline_height / 2
|
text_baseline_height / 2
|
||||||
|
Loading…
Reference in New Issue
Block a user