summaryrefslogtreecommitdiffstats
path: root/native/src/renderer/null.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector0193@gmail.com>2021-09-15 15:50:10 +0700
committerLibravatar GitHub <noreply@github.com>2021-09-15 15:50:10 +0700
commit5870cbb312ec5de1219b6983e09e460419d95912 (patch)
treeadd25c986ba0582628d921e45c2eae4006e19ee4 /native/src/renderer/null.rs
parent93fec8d273ef8305e1c2456abe0c8ecd7a9d9407 (diff)
parentc914b2a05be2c33ec936f63efd25daaf2b4c4739 (diff)
downloadiced-5870cbb312ec5de1219b6983e09e460419d95912.tar.gz
iced-5870cbb312ec5de1219b6983e09e460419d95912.tar.bz2
iced-5870cbb312ec5de1219b6983e09e460419d95912.zip
Merge pull request #1046 from iced-rs/fix/empty-text-hit-test
Use `Option` to encode empty text case in hit test methods
Diffstat (limited to '')
-rw-r--r--native/src/renderer/null.rs6
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(