diff options
author | 2020-05-07 01:33:11 +0200 | |
---|---|---|
committer | 2020-07-08 11:06:41 +0200 | |
commit | a2642366240f64f0699fe5fc048b99ace2031751 (patch) | |
tree | 5883a7045e6fac69f9cf64144b5b0a07122702b2 /native | |
parent | f655d9b9674fe5a705e26b8797231d93a117395b (diff) | |
download | iced-a2642366240f64f0699fe5fc048b99ace2031751.tar.gz iced-a2642366240f64f0699fe5fc048b99ace2031751.tar.bz2 iced-a2642366240f64f0699fe5fc048b99ace2031751.zip |
Implement `Widget::overlay` for `Row`
Diffstat (limited to 'native')
-rw-r--r-- | native/src/widget/row.rs | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/native/src/widget/row.rs b/native/src/widget/row.rs index 1ebbac6b..25bd641f 100644 --- a/native/src/widget/row.rs +++ b/native/src/widget/row.rs @@ -2,8 +2,8 @@ use std::hash::Hash; use crate::{ - layout, Align, Clipboard, Element, Event, Hasher, Layout, Length, Point, - Widget, + layout, Align, Clipboard, Element, Event, Hasher, Layout, Length, Overlay, + Point, Widget, }; use std::u32; @@ -206,6 +206,17 @@ where child.widget.hash_layout(state); } } + + fn overlay( + &mut self, + layout: Layout<'_>, + ) -> Option<Overlay<'a, Message, Renderer>> { + self.children + .iter_mut() + .zip(layout.children()) + .filter_map(|(child, layout)| child.widget.overlay(layout)) + .next() + } } /// The renderer of a [`Row`]. |