diff options
Diffstat (limited to 'native/src/overlay/element.rs')
-rw-r--r-- | native/src/overlay/element.rs | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/native/src/overlay/element.rs b/native/src/overlay/element.rs index 125258c5..edeb7dbf 100644 --- a/native/src/overlay/element.rs +++ b/native/src/overlay/element.rs @@ -116,13 +116,9 @@ where self.overlay.operate(layout, renderer, operation); } - /// Whether the [`Overlay`] contains the cursor - pub fn contains_cursor( - &self, - layout: Layout<'_>, - cursor_position: Point, - ) -> bool { - self.overlay.contains_cursor(layout, cursor_position) + /// Returns true if the cursor is over the [`Element`] + pub fn is_over(&self, layout: Layout<'_>, cursor_position: Point) -> bool { + self.overlay.is_over(layout, cursor_position) } } @@ -262,11 +258,7 @@ where .draw(renderer, theme, style, layout, cursor_position) } - fn contains_cursor( - &self, - layout: Layout<'_>, - cursor_position: Point, - ) -> bool { - self.content.contains_cursor(layout, cursor_position) + fn is_over(&self, layout: Layout<'_>, cursor_position: Point) -> bool { + self.content.is_over(layout, cursor_position) } } |