images are centered

This commit is contained in:
azy 2025-02-13 22:46:46 +08:00
parent 188b55ad25
commit 3b0e56971c

View File

@ -243,10 +243,10 @@ fn build_image_paragraph(
)) ))
}) })
.collect::<Vec<Line>>(); .collect::<Vec<Line>>();
let text = Text::from(lines); let text_image = Text::from(lines);
Paragraph::new(text) Paragraph::new(text_image)
.block(preview_block) .block(preview_block)
.wrap(Wrap { trim: false }) .alignment(Alignment::Center)
} }
pub fn build_meta_preview_paragraph<'a>( pub fn build_meta_preview_paragraph<'a>(