summaryrefslogtreecommitdiffstats
path: root/web/src/widget
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2021-10-18 15:36:32 +0700
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2021-10-18 15:36:32 +0700
commitd61cb58d92b6fcd520f665deb093f3747ffd5e5c (patch)
treed65fbd23f2ccbb46b18d2e3bbf214d321f6e980c /web/src/widget
parentedea093350e1b576e2b7db50c525e7fa5c3bea9f (diff)
downloadiced-d61cb58d92b6fcd520f665deb093f3747ffd5e5c.tar.gz
iced-d61cb58d92b6fcd520f665deb093f3747ffd5e5c.tar.bz2
iced-d61cb58d92b6fcd520f665deb093f3747ffd5e5c.zip
Wire up `container` styling to `iced_native`
Diffstat (limited to 'web/src/widget')
-rw-r--r--web/src/widget/container.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/web/src/widget/container.rs b/web/src/widget/container.rs
index 24aa7cef..e61600c4 100644
--- a/web/src/widget/container.rs
+++ b/web/src/widget/container.rs
@@ -19,7 +19,7 @@ pub struct Container<'a, Message> {
max_height: u32,
horizontal_alignment: alignment::Horizontal,
vertical_alignment: alignment::Vertical,
- style_sheet: Box<dyn StyleSheet>,
+ style_sheet: &'a dyn StyleSheet,
content: Element<'a, Message>,
}
@@ -89,8 +89,8 @@ impl<'a, Message> Container<'a, Message> {
}
/// Sets the style of the [`Container`].
- pub fn style(mut self, style: impl Into<Box<dyn StyleSheet>>) -> Self {
- self.style_sheet = style.into();
+ pub fn style(mut self, style: &'a dyn StyleSheet) -> Self {
+ self.style_sheet = style;
self
}
}