1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-03-24 20:15:44 +00:00

feat(core): allow more paragraphs in ShowInfoParams

Otherwise, it fails when showing 4 items.

Note that each item results in 2 paragraphs (key and value).
Also, items are separated by an empty paragraph.

So 3 items use 8 (2*3+2) paragraphs and 4 items use 11 (2*4+3) paragraphs.

[no changelog]
This commit is contained in:
Roman Zeyde 2025-02-18 10:42:01 +02:00 committed by Roman Zeyde
parent 0abfc7b1f9
commit ae3b6434fc

View File

@ -9,7 +9,7 @@ use crate::{
base::ComponentExt,
swipe_detect::SwipeSettings,
text::{
paragraphs::{Paragraph, ParagraphSource, ParagraphVecShort, VecExt},
paragraphs::{Paragraph, ParagraphSource, ParagraphVecLong, VecExt},
TextStyle,
},
Component,
@ -386,7 +386,7 @@ impl ShowInfoParams {
pub fn into_layout(
self,
) -> Result<impl Component<Msg = FlowMsg> + Swipable + MaybeTrace, Error> {
let mut paragraphs = ParagraphVecShort::new();
let mut paragraphs = ParagraphVecLong::new();
let mut first: bool = true;
for item in self.items {
// FIXME: padding: