diff options
| author | 2021-10-31 17:42:43 +0700 | |
|---|---|---|
| committer | 2021-10-31 17:42:43 +0700 | |
| commit | 0c76e0307ff7d4450c354812f8a25047f24948b4 (patch) | |
| tree | c4ab989d99c65e2099a39d1e2f7a29db4816443b /web/src/widget | |
| parent | eed19dcf81334d0849744f1918ba880d5a7acc1c (diff) | |
| download | iced-0c76e0307ff7d4450c354812f8a25047f24948b4.tar.gz iced-0c76e0307ff7d4450c354812f8a25047f24948b4.tar.bz2 iced-0c76e0307ff7d4450c354812f8a25047f24948b4.zip | |
Reintroduce `Box` for `style_sheet` in `Slider`
Diffstat (limited to '')
| -rw-r--r-- | web/src/widget/slider.rs | 7 | 
1 files changed, 5 insertions, 2 deletions
| diff --git a/web/src/widget/slider.rs b/web/src/widget/slider.rs index 7ec84475..8cbf5bd0 100644 --- a/web/src/widget/slider.rs +++ b/web/src/widget/slider.rs @@ -41,7 +41,7 @@ pub struct Slider<'a, T, Message> {      #[allow(dead_code)]      width: Length,      #[allow(dead_code)] -    style_sheet: &'a dyn StyleSheet, +    style_sheet: Box<dyn StyleSheet + 'a>,  }  impl<'a, T, Message> Slider<'a, T, Message> @@ -96,7 +96,10 @@ where      }      /// Sets the style of the [`Slider`]. -    pub fn style(mut self, style_sheet: &'a dyn StyleSheet) -> Self { +    pub fn style( +        mut self, +        style_sheet: impl Into<Box<dyn StyleSheet + 'a>>, +    ) -> Self {          self.style_sheet = style_sheet.into();          self      } | 
