Merge pull request #1699 from nicksenger/overlay/is_over
Implement `is_over` for iced_lazy widget `Overlay`s
This commit is contained in:
commit
2c680a3e5f
3 changed files with 21 additions and 0 deletions
|
|
@ -563,4 +563,11 @@ where
|
|||
|
||||
event_status
|
||||
}
|
||||
|
||||
fn is_over(&self, layout: Layout<'_>, cursor_position: Point) -> bool {
|
||||
self.with_overlay_maybe(|overlay| {
|
||||
overlay.is_over(layout, cursor_position)
|
||||
})
|
||||
.unwrap_or_default()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -372,6 +372,13 @@ where
|
|||
})
|
||||
.unwrap_or(iced_native::event::Status::Ignored)
|
||||
}
|
||||
|
||||
fn is_over(&self, layout: Layout<'_>, cursor_position: Point) -> bool {
|
||||
self.with_overlay_maybe(|overlay| {
|
||||
overlay.is_over(layout, cursor_position)
|
||||
})
|
||||
.unwrap_or_default()
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a, Message, Renderer, Dependency, View>
|
||||
|
|
|
|||
|
|
@ -415,4 +415,11 @@ where
|
|||
})
|
||||
.unwrap_or(iced_native::event::Status::Ignored)
|
||||
}
|
||||
|
||||
fn is_over(&self, layout: Layout<'_>, cursor_position: Point) -> bool {
|
||||
self.with_overlay_maybe(|overlay| {
|
||||
overlay.is_over(layout, cursor_position)
|
||||
})
|
||||
.unwrap_or_default()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue