summaryrefslogtreecommitdiffstats
path: root/native
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2020-05-07 01:33:11 +0200
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2020-07-08 11:06:41 +0200
commita2642366240f64f0699fe5fc048b99ace2031751 (patch)
tree5883a7045e6fac69f9cf64144b5b0a07122702b2 /native
parentf655d9b9674fe5a705e26b8797231d93a117395b (diff)
downloadiced-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.rs15
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`].