diff options
author | 2024-09-04 21:25:59 +0200 | |
---|---|---|
committer | 2024-09-04 21:26:47 +0200 | |
commit | f98328f4f1ee58b6288e4f19d7475e7eeb9a7ba7 (patch) | |
tree | 8fb3e8b470bff711e0ca2f1bf120ab6c66ba9a9d /core/src/text | |
parent | 8d826cc662554b337282e7c982383f5db428d7aa (diff) | |
download | iced-f98328f4f1ee58b6288e4f19d7475e7eeb9a7ba7.tar.gz iced-f98328f4f1ee58b6288e4f19d7475e7eeb9a7ba7.tar.bz2 iced-f98328f4f1ee58b6288e4f19d7475e7eeb9a7ba7.zip |
Add `text::Wrapping` support
Co-authored-by: Neeraj Jaiswal <neerajj85@gmail.com>
Diffstat (limited to 'core/src/text')
-rw-r--r-- | core/src/text/editor.rs | 3 | ||||
-rw-r--r-- | core/src/text/paragraph.rs | 1 |
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 => { |