diff options
Diffstat (limited to 'src/text.rs')
| -rw-r--r-- | src/text.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/text.rs b/src/text.rs index 96d4f1b..07ced03 100644 --- a/src/text.rs +++ b/src/text.rs @@ -1,7 +1,6 @@ //! Text widgets display information through writing. mod rich; -pub use iced_widget::text::Rich; use iced_widget::{ core::{ self, Color, Element, Event, Font, Layout, Length, Pixels, Point, Size, @@ -20,7 +19,9 @@ use iced_widget::{ }, graphics::text::Paragraph, }; +pub use rich::Rich; use text::{Alignment, LineHeight, Shaping, Wrapping}; +pub use text::{Fragment, Highlighter, IntoFragment, Span}; use crate::selection::{Selection, SelectionEnd}; @@ -33,7 +34,7 @@ pub struct Text< Theme: Catalog, Renderer: text::Renderer, { - fragment: text::Fragment<'a>, + fragment: Fragment<'a>, format: Format<Renderer::Font>, class: Theme::Class<'a>, } @@ -44,7 +45,7 @@ where Renderer: text::Renderer, { /// Create a new fragment of [`Text`] with the given contents. - pub fn new(fragment: impl text::IntoFragment<'a>) -> Self { + pub fn new(fragment: impl IntoFragment<'a>) -> Self { Self { fragment: fragment.into_fragment(), format: Format::default(), |
