summaryrefslogtreecommitdiffstats
path: root/native/src/widget/container.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector0193@gmail.com>2020-07-16 05:00:37 +0200
committerLibravatar GitHub <noreply@github.com>2020-07-16 05:00:37 +0200
commitda5da3958e3b7fe85e371846a795c4ae05cb2df7 (patch)
treecd9f353e005ebc9c49d987125ba168a87982c629 /native/src/widget/container.rs
parent62ec03a0afe8566a8f0b06675990a83fd65de1a9 (diff)
parent31c30fedd5e5ad74cc1f66162d7e5c0e5e3cf420 (diff)
downloadiced-da5da3958e3b7fe85e371846a795c4ae05cb2df7.tar.gz
iced-da5da3958e3b7fe85e371846a795c4ae05cb2df7.tar.bz2
iced-da5da3958e3b7fe85e371846a795c4ae05cb2df7.zip
Merge pull request #444 from hecrj/feature/overlay
Overlay support and `PickList` widget
Diffstat (limited to 'native/src/widget/container.rs')
-rw-r--r--native/src/widget/container.rs11
1 files changed, 9 insertions, 2 deletions
diff --git a/native/src/widget/container.rs b/native/src/widget/container.rs
index 2590fe3b..b8316e62 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, overlay, Align, Clipboard, Element, Event, Hasher, Layout, Length,
+ Point, Rectangle, Widget,
};
use std::u32;
@@ -214,6 +214,13 @@ where
self.content.hash_layout(state);
}
+
+ fn overlay(
+ &mut self,
+ layout: Layout<'_>,
+ ) -> Option<overlay::Element<'_, Message, Renderer>> {
+ self.content.overlay(layout.children().next().unwrap())
+ }
}
/// The renderer of a [`Container`].