Skip to content

Commit f4eebf0

Browse files
authored
Merge pull request #2723 from Konsl/master
Apply `Wrapping` to `Paragraph`s
2 parents e722c4e + bffe572 commit f4eebf0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

graphics/src/text/paragraph.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@ impl core::text::Paragraph for Paragraph {
8080
Some(text.bounds.height),
8181
);
8282

83+
buffer.set_wrap(font_system.raw(), text::to_wrap(text.wrapping));
84+
8385
buffer.set_text(
8486
font_system.raw(),
8587
text.content,
@@ -122,6 +124,8 @@ impl core::text::Paragraph for Paragraph {
122124
Some(text.bounds.height),
123125
);
124126

127+
buffer.set_wrap(font_system.raw(), text::to_wrap(text.wrapping));
128+
125129
buffer.set_rich_text(
126130
font_system.raw(),
127131
text.content.iter().enumerate().map(|(i, span)| {

0 commit comments

Comments
 (0)