summaryrefslogtreecommitdiffstats
path: root/examples/scrollable
diff options
context:
space:
mode:
Diffstat (limited to 'examples/scrollable')
-rw-r--r--examples/scrollable/src/main.rs2
-rw-r--r--examples/scrollable/src/style.rs4
2 files changed, 3 insertions, 3 deletions
diff --git a/examples/scrollable/src/main.rs b/examples/scrollable/src/main.rs
index 272f0ce2..3416b83d 100644
--- a/examples/scrollable/src/main.rs
+++ b/examples/scrollable/src/main.rs
@@ -95,7 +95,7 @@ impl Sandbox for ScrollableDemo {
.on_scroll(move |offset| {
Message::Scrolled(i, offset)
})
- .style(theme.clone().into())
+ .style(*theme)
.push(Text::new(variant.title))
.push(
Button::new(
diff --git a/examples/scrollable/src/style.rs b/examples/scrollable/src/style.rs
index 3c8e5234..ec1f13db 100644
--- a/examples/scrollable/src/style.rs
+++ b/examples/scrollable/src/style.rs
@@ -34,11 +34,11 @@ impl<'a> From<Theme> for Box<dyn radio::StyleSheet + 'a> {
}
}
-impl From<Theme> for &'static dyn scrollable::StyleSheet {
+impl<'a> From<Theme> for Box<dyn scrollable::StyleSheet + 'a> {
fn from(theme: Theme) -> Self {
match theme {
Theme::Light => Default::default(),
- Theme::Dark => &dark::Scrollable,
+ Theme::Dark => dark::Scrollable.into(),
}
}
}