Add text::Wrapping support
Co-authored-by: Neeraj Jaiswal <neerajj85@gmail.com>
This commit is contained in:
parent
8d826cc662
commit
f98328f4f1
21 changed files with 160 additions and 30 deletions
|
|
@ -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,
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -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 => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue