summaryrefslogtreecommitdiffstats
path: root/web/src/widget/scrollable.rs
diff options
context:
space:
mode:
Diffstat (limited to 'web/src/widget/scrollable.rs')
-rw-r--r--web/src/widget/scrollable.rs11
1 files changed, 7 insertions, 4 deletions
diff --git a/web/src/widget/scrollable.rs b/web/src/widget/scrollable.rs
index 847bf5a0..22cb61be 100644
--- a/web/src/widget/scrollable.rs
+++ b/web/src/widget/scrollable.rs
@@ -14,7 +14,7 @@ pub struct Scrollable<'a, Message> {
max_height: u32,
content: Column<'a, Message>,
#[allow(dead_code)]
- style: Box<dyn StyleSheet>,
+ style_sheet: Box<dyn StyleSheet + 'a>,
}
impl<'a, Message> Scrollable<'a, Message> {
@@ -27,7 +27,7 @@ impl<'a, Message> Scrollable<'a, Message> {
height: Length::Shrink,
max_height: u32::MAX,
content: Column::new(),
- style: Default::default(),
+ style_sheet: Default::default(),
}
}
@@ -78,8 +78,11 @@ impl<'a, Message> Scrollable<'a, Message> {
}
/// Sets the style of the [`Scrollable`] .
- pub fn style(mut self, style: impl Into<Box<dyn StyleSheet>>) -> Self {
- self.style = style.into();
+ pub fn style(
+ mut self,
+ style_sheet: impl Into<Box<dyn StyleSheet + 'a>>,
+ ) -> Self {
+ self.style_sheet = style_sheet.into();
self
}