summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Héctor <hector@hecrj.dev>2025-01-10 23:46:40 +0100
committerLibravatar GitHub <noreply@github.com>2025-01-10 23:46:40 +0100
commitf4eebf0f61aafb5924ee7a02dfdc8816dcdce9c5 (patch)
treeeb5471d7855e4b10605bc4448fcc9fcac300cfd4
parente722c4ee4f80833ba0b1013cadd546ebc3f490ce (diff)
parentbffe572a045af6f06b307dbab300233a476c4d32 (diff)
downloadiced-f4eebf0f61aafb5924ee7a02dfdc8816dcdce9c5.tar.gz
iced-f4eebf0f61aafb5924ee7a02dfdc8816dcdce9c5.tar.bz2
iced-f4eebf0f61aafb5924ee7a02dfdc8816dcdce9c5.zip
Merge pull request #2723 from Konsl/master
Apply `Wrapping` to `Paragraph`s
-rw-r--r--graphics/src/text/paragraph.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/graphics/src/text/paragraph.rs b/graphics/src/text/paragraph.rs
index 07ddbb82..48c8e9e6 100644
--- a/graphics/src/text/paragraph.rs
+++ b/graphics/src/text/paragraph.rs
@@ -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)| {