Merge pull request #2723 from Konsl/master

Apply `Wrapping` to `Paragraph`s
This commit is contained in:
Héctor 2025-01-10 23:46:40 +01:00 committed by GitHub
commit f4eebf0f61
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -80,6 +80,8 @@ impl core::text::Paragraph for Paragraph {
Some(text.bounds.height),
);
buffer.set_wrap(font_system.raw(), text::to_wrap(text.wrapping));
buffer.set_text(
font_system.raw(),
text.content,
@ -122,6 +124,8 @@ impl core::text::Paragraph for Paragraph {
Some(text.bounds.height),
);
buffer.set_wrap(font_system.raw(), text::to_wrap(text.wrapping));
buffer.set_rich_text(
font_system.raw(),
text.content.iter().enumerate().map(|(i, span)| {