summaryrefslogtreecommitdiffstats
path: root/examples/scrollable
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2021-10-20 19:06:53 +0700
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2021-10-20 19:18:40 +0700
commitd39ad717ed0ab85acbe935d7ab883166b36e7bc7 (patch)
tree2be868e8d040a1cfa8c6d5bae7c16b1c3ee88fec /examples/scrollable
parentcc560aca181202e827bfdc9afb6fc9fbe42f54d6 (diff)
downloadiced-d39ad717ed0ab85acbe935d7ab883166b36e7bc7.tar.gz
iced-d39ad717ed0ab85acbe935d7ab883166b36e7bc7.tar.bz2
iced-d39ad717ed0ab85acbe935d7ab883166b36e7bc7.zip
Wire up styling to `Radio` in `iced_native`
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 bc20d428..2f1c5676 100644
--- a/examples/scrollable/src/main.rs
+++ b/examples/scrollable/src/main.rs
@@ -76,7 +76,7 @@ impl Sandbox for ScrollableDemo {
Some(*theme),
Message::ThemeChanged,
)
- .style(*theme),
+ .style(theme.clone().into()),
)
},
);
diff --git a/examples/scrollable/src/style.rs b/examples/scrollable/src/style.rs
index 66f3b9d3..d7d64374 100644
--- a/examples/scrollable/src/style.rs
+++ b/examples/scrollable/src/style.rs
@@ -25,11 +25,11 @@ impl From<Theme> for &'static dyn container::StyleSheet {
}
}
-impl From<Theme> for Box<dyn radio::StyleSheet> {
+impl From<Theme> for &'static dyn radio::StyleSheet {
fn from(theme: Theme) -> Self {
match theme {
Theme::Light => Default::default(),
- Theme::Dark => dark::Radio.into(),
+ Theme::Dark => &dark::Radio,
}
}
}