diff options
author | 2021-09-15 14:49:13 +0700 | |
---|---|---|
committer | 2021-09-15 14:49:13 +0700 | |
commit | 643500bbdf1a169db1bcdcb8e971334037274d38 (patch) | |
tree | c2e4131f9bdc788052b584da05a6ee1ce2e8d71b /native/src/renderer | |
parent | 93fec8d273ef8305e1c2456abe0c8ecd7a9d9407 (diff) | |
download | iced-643500bbdf1a169db1bcdcb8e971334037274d38.tar.gz iced-643500bbdf1a169db1bcdcb8e971334037274d38.tar.bz2 iced-643500bbdf1a169db1bcdcb8e971334037274d38.zip |
Use `Option` to encode empty text case in hit test methods
Diffstat (limited to 'native/src/renderer')
-rw-r--r-- | native/src/renderer/null.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/native/src/renderer/null.rs b/native/src/renderer/null.rs index b1a26c41..2c47ddf2 100644 --- a/native/src/renderer/null.rs +++ b/native/src/renderer/null.rs @@ -2,7 +2,7 @@ use crate::{ button, checkbox, column, container, pane_grid, progress_bar, radio, row, scrollable, slider, text, text_input, toggler, Color, Element, Font, HorizontalAlignment, Layout, Padding, Point, Rectangle, Renderer, Size, - Vector, VerticalAlignment, + VerticalAlignment, }; /// A renderer that does nothing. @@ -75,8 +75,8 @@ impl text::Renderer for Null { _bounds: Size, _point: Point, _nearest_only: bool, - ) -> text::Hit { - text::Hit::NearestCharOffset(0, Vector::new(0., 0.)) + ) -> Option<text::Hit> { + None } fn draw( |