summaryrefslogtreecommitdiffstats
path: root/native/src/widget
diff options
context:
space:
mode:
Diffstat (limited to 'native/src/widget')
-rw-r--r--native/src/widget/column.rs15
-rw-r--r--native/src/widget/container.rs11
2 files changed, 22 insertions, 4 deletions
diff --git a/native/src/widget/column.rs b/native/src/widget/column.rs
index 6afc94d6..9a6dbdb3 100644
--- a/native/src/widget/column.rs
+++ b/native/src/widget/column.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;
@@ -204,6 +204,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 [`Column`].
diff --git a/native/src/widget/container.rs b/native/src/widget/container.rs
index 3ad12eeb..3bdb1a27 100644
--- a/native/src/widget/container.rs
+++ b/native/src/widget/container.rs
@@ -2,8 +2,8 @@
use std::hash::Hash;
use crate::{
- layout, Align, Clipboard, Element, Event, Hasher, Layout, Length, Point,
- Rectangle, Widget,
+ layout, Align, Clipboard, Element, Event, Hasher, Layout, Length, Overlay,
+ Point, Rectangle, Widget,
};
use std::u32;
@@ -214,6 +214,13 @@ where
self.content.hash_layout(state);
}
+
+ fn overlay(
+ &mut self,
+ layout: Layout<'_>,
+ ) -> Option<Overlay<'a, Message, Renderer>> {
+ self.content.overlay(layout.children().next().unwrap())
+ }
}
/// The renderer of a [`Container`].