diff options
author | 2023-06-14 20:32:45 +0200 | |
---|---|---|
committer | 2023-06-14 20:32:45 +0200 | |
commit | 267dbf34e94bbdfe99de857aea5930f1fcac7aec (patch) | |
tree | 4a95386401a0dd87f5f87c0695a40c58a372ecb2 /core/src/overlay.rs | |
parent | 329fbc7b2157b84183849b2e0f600eb039435aed (diff) | |
parent | 9803b276ad087846dfc3bb349113c5799ce00141 (diff) | |
download | iced-267dbf34e94bbdfe99de857aea5930f1fcac7aec.tar.gz iced-267dbf34e94bbdfe99de857aea5930f1fcac7aec.tar.bz2 iced-267dbf34e94bbdfe99de857aea5930f1fcac7aec.zip |
Merge pull request #1719 from tarkah/feat/nested-overlay
Nested overlays
Diffstat (limited to 'core/src/overlay.rs')
-rw-r--r-- | core/src/overlay.rs | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/core/src/overlay.rs b/core/src/overlay.rs index 1fa994e4..2e05db93 100644 --- a/core/src/overlay.rs +++ b/core/src/overlay.rs @@ -91,9 +91,23 @@ where /// /// By default, it returns true if the bounds of the `layout` contain /// the `cursor_position`. - fn is_over(&self, layout: Layout<'_>, cursor_position: Point) -> bool { + fn is_over( + &self, + layout: Layout<'_>, + _renderer: &Renderer, + cursor_position: Point, + ) -> bool { layout.bounds().contains(cursor_position) } + + /// Returns the nested overlay of the [`Overlay`], if there is any. + fn overlay<'a>( + &'a mut self, + _layout: Layout<'_>, + _renderer: &Renderer, + ) -> Option<Element<'a, Message, Renderer>> { + None + } } /// Returns a [`Group`] of overlay [`Element`] children. |