diff options
| author | 2021-10-18 15:36:32 +0700 | |
|---|---|---|
| committer | 2021-10-18 15:36:32 +0700 | |
| commit | d61cb58d92b6fcd520f665deb093f3747ffd5e5c (patch) | |
| tree | d65fbd23f2ccbb46b18d2e3bbf214d321f6e980c /web/src/widget | |
| parent | edea093350e1b576e2b7db50c525e7fa5c3bea9f (diff) | |
| download | iced-d61cb58d92b6fcd520f665deb093f3747ffd5e5c.tar.gz iced-d61cb58d92b6fcd520f665deb093f3747ffd5e5c.tar.bz2 iced-d61cb58d92b6fcd520f665deb093f3747ffd5e5c.zip  | |
Wire up `container` styling to `iced_native`
Diffstat (limited to '')
| -rw-r--r-- | web/src/widget/container.rs | 6 | 
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      }  }  | 
