diff options
Diffstat (limited to 'examples/scrollable')
-rw-r--r-- | examples/scrollable/src/main.rs | 2 | ||||
-rw-r--r-- | examples/scrollable/src/style.rs | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/examples/scrollable/src/main.rs b/examples/scrollable/src/main.rs index 3416b83d..272f0ce2 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) + .style(theme.clone().into()) .push(Text::new(variant.title)) .push( Button::new( diff --git a/examples/scrollable/src/style.rs b/examples/scrollable/src/style.rs index ae449141..d955f52d 100644 --- a/examples/scrollable/src/style.rs +++ b/examples/scrollable/src/style.rs @@ -34,11 +34,11 @@ impl From<Theme> for Box<dyn radio::StyleSheet> { } } -impl From<Theme> for Box<dyn scrollable::StyleSheet> { +impl From<Theme> for &'static dyn scrollable::StyleSheet { fn from(theme: Theme) -> Self { match theme { Theme::Light => Default::default(), - Theme::Dark => dark::Scrollable.into(), + Theme::Dark => &dark::Scrollable, } } } |