summaryrefslogtreecommitdiffstats
path: root/web/src/widget
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2021-10-20 15:50:42 +0700
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2021-10-20 15:50:42 +0700
commit11bcb1342796a6fabc7c5b89a15c22c754b014ce (patch)
treed55c147d35d422b219bd813ec71d49bb09833951 /web/src/widget
parente00a2e9b2d97147be5912a97362d1bf1705b7c4e (diff)
downloadiced-11bcb1342796a6fabc7c5b89a15c22c754b014ce.tar.gz
iced-11bcb1342796a6fabc7c5b89a15c22c754b014ce.tar.bz2
iced-11bcb1342796a6fabc7c5b89a15c22c754b014ce.zip
Wire up styling to `Slider` in `iced_native`
Diffstat (limited to 'web/src/widget')
-rw-r--r--web/src/widget/slider.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/web/src/widget/slider.rs b/web/src/widget/slider.rs
index f457aa4c..7ec84475 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: Box<dyn StyleSheet>,
+ style_sheet: &'a dyn StyleSheet,
}
impl<'a, T, Message> Slider<'a, T, Message>
@@ -85,7 +85,7 @@ where
step: T::from(1),
on_change: Rc::new(Box::new(on_change)),
width: Length::Fill,
- style: Default::default(),
+ style_sheet: Default::default(),
}
}
@@ -96,8 +96,8 @@ where
}
/// Sets the style of the [`Slider`].
- pub fn style(mut self, style: impl Into<Box<dyn StyleSheet>>) -> Self {
- self.style = style.into();
+ pub fn style(mut self, style_sheet: &'a dyn StyleSheet) -> Self {
+ self.style_sheet = style_sheet.into();
self
}