summaryrefslogtreecommitdiffstats
path: root/core/src/text
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector@hecrj.dev>2024-09-04 21:42:11 +0200
committerLibravatar GitHub <noreply@github.com>2024-09-04 21:42:11 +0200
commit6009420b57933ccf799f1b7eac8debab950cdd5e (patch)
treee6218826131a702e51adf3041a45871140bae0be /core/src/text
parent8d826cc662554b337282e7c982383f5db428d7aa (diff)
parent3a70462a7232cc2b3a7cc3fe8d07f0c29cc578cc (diff)
downloadiced-6009420b57933ccf799f1b7eac8debab950cdd5e.tar.gz
iced-6009420b57933ccf799f1b7eac8debab950cdd5e.tar.bz2
iced-6009420b57933ccf799f1b7eac8debab950cdd5e.zip
Merge pull request #2279 from nrjais/wrapping
Add `text::Wrapping` support
Diffstat (limited to 'core/src/text')
-rw-r--r--core/src/text/editor.rs3
-rw-r--r--core/src/text/paragraph.rs1
2 files changed, 3 insertions, 1 deletions
diff --git a/core/src/text/editor.rs b/core/src/text/editor.rs
index 135707d1..cd30db3a 100644
--- a/core/src/text/editor.rs
+++ b/core/src/text/editor.rs
@@ -1,6 +1,6 @@
//! Edit text.
use crate::text::highlighter::{self, Highlighter};
-use crate::text::LineHeight;
+use crate::text::{LineHeight, Wrapping};
use crate::{Pixels, Point, Rectangle, Size};
use std::sync::Arc;
@@ -50,6 +50,7 @@ pub trait Editor: Sized + Default {
new_font: Self::Font,
new_size: Pixels,
new_line_height: LineHeight,
+ new_wrapping: Wrapping,
new_highlighter: &mut impl Highlighter,
);
diff --git a/core/src/text/paragraph.rs b/core/src/text/paragraph.rs
index 04a97f35..924276c3 100644
--- a/core/src/text/paragraph.rs
+++ b/core/src/text/paragraph.rs
@@ -95,6 +95,7 @@ impl<P: Paragraph> Plain<P> {
horizontal_alignment: text.horizontal_alignment,
vertical_alignment: text.vertical_alignment,
shaping: text.shaping,
+ wrapping: text.wrapping,
}) {
Difference::None => {}
Difference::Bounds => {