summaryrefslogtreecommitdiffstats
path: root/web/src/widget
diff options
context:
space:
mode:
Diffstat (limited to 'web/src/widget')
-rw-r--r--web/src/widget/slider.rs7
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
}