diff options
Diffstat (limited to 'native')
-rw-r--r-- | native/src/lib.rs | 4 | ||||
-rw-r--r-- | native/src/renderer/null.rs | 8 | ||||
-rw-r--r-- | native/src/widget/text.rs | 10 |
3 files changed, 12 insertions, 10 deletions
diff --git a/native/src/lib.rs b/native/src/lib.rs index 06bfd3c5..cbb02506 100644 --- a/native/src/lib.rs +++ b/native/src/lib.rs @@ -61,8 +61,8 @@ mod debug; mod debug; pub use iced_core::{ - menu, Align, Background, Color, Font, HitTestResult, HorizontalAlignment, - Length, Menu, Padding, Point, Rectangle, Size, Vector, VerticalAlignment, + menu, Align, Background, Color, Font, HorizontalAlignment, Length, Menu, + Padding, Point, Rectangle, Size, Vector, VerticalAlignment, }; pub use iced_futures::{executor, futures, Command}; diff --git a/native/src/renderer/null.rs b/native/src/renderer/null.rs index 3ae05f10..b1a26c41 100644 --- a/native/src/renderer/null.rs +++ b/native/src/renderer/null.rs @@ -1,8 +1,8 @@ use crate::{ button, checkbox, column, container, pane_grid, progress_bar, radio, row, scrollable, slider, text, text_input, toggler, Color, Element, Font, - HitTestResult, HorizontalAlignment, Layout, Padding, Point, Rectangle, - Renderer, Size, Vector, VerticalAlignment, + HorizontalAlignment, Layout, Padding, Point, Rectangle, Renderer, Size, + Vector, VerticalAlignment, }; /// A renderer that does nothing. @@ -75,8 +75,8 @@ impl text::Renderer for Null { _bounds: Size, _point: Point, _nearest_only: bool, - ) -> HitTestResult { - HitTestResult::NearestCharOffset(0, Vector::new(0., 0.)) + ) -> text::Hit { + text::Hit::NearestCharOffset(0, Vector::new(0., 0.)) } fn draw( diff --git a/native/src/widget/text.rs b/native/src/widget/text.rs index f37f90a9..adf6a74f 100644 --- a/native/src/widget/text.rs +++ b/native/src/widget/text.rs @@ -1,9 +1,11 @@ //! Write some text for your users to read. use crate::{ - layout, Color, Element, Hasher, HitTestResult, HorizontalAlignment, Layout, - Length, Point, Rectangle, Size, VerticalAlignment, Widget, + layout, Color, Element, Hasher, HorizontalAlignment, Layout, Length, Point, + Rectangle, Size, VerticalAlignment, Widget, }; +pub use iced_core::text::Hit; + use std::hash::Hash; /// A paragraph of text. @@ -183,7 +185,7 @@ pub trait Renderer: crate::Renderer { /// laid out with the given parameters, returning information about /// the nearest character. /// - /// If nearest_only is true, the hit test does not consider whether the + /// If `nearest_only` is true, the hit test does not consider whether the /// the point is interior to any glyph bounds, returning only the character /// with the nearest centeroid. fn hit_test( @@ -194,7 +196,7 @@ pub trait Renderer: crate::Renderer { bounds: Size, point: Point, nearest_only: bool, - ) -> HitTestResult; + ) -> Hit; /// Draws a [`Text`] fragment. /// |