mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-05-29 04:08:46 +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:
parent
0abfc7b1f9
commit
ae3b6434fc
@ -9,7 +9,7 @@ use crate::{
|
|||||||
base::ComponentExt,
|
base::ComponentExt,
|
||||||
swipe_detect::SwipeSettings,
|
swipe_detect::SwipeSettings,
|
||||||
text::{
|
text::{
|
||||||
paragraphs::{Paragraph, ParagraphSource, ParagraphVecShort, VecExt},
|
paragraphs::{Paragraph, ParagraphSource, ParagraphVecLong, VecExt},
|
||||||
TextStyle,
|
TextStyle,
|
||||||
},
|
},
|
||||||
Component,
|
Component,
|
||||||
@ -386,7 +386,7 @@ impl ShowInfoParams {
|
|||||||
pub fn into_layout(
|
pub fn into_layout(
|
||||||
self,
|
self,
|
||||||
) -> Result<impl Component<Msg = FlowMsg> + Swipable + MaybeTrace, Error> {
|
) -> Result<impl Component<Msg = FlowMsg> + Swipable + MaybeTrace, Error> {
|
||||||
let mut paragraphs = ParagraphVecShort::new();
|
let mut paragraphs = ParagraphVecLong::new();
|
||||||
let mut first: bool = true;
|
let mut first: bool = true;
|
||||||
for item in self.items {
|
for item in self.items {
|
||||||
// FIXME: padding:
|
// FIXME: padding:
|
||||||
|
Loading…
Reference in New Issue
Block a user