Skip to content

Commit

Permalink
Merge pull request #2723 from Konsl/master
Browse files Browse the repository at this point in the history
Apply `Wrapping` to `Paragraph`s
  • Loading branch information
hecrj authored Jan 10, 2025
2 parents e722c4e + bffe572 commit f4eebf0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions graphics/src/text/paragraph.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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)| {
Expand Down

0 comments on commit f4eebf0

Please sign in to comment.