summaryrefslogtreecommitdiffstats
path: root/examples/styling
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2021-10-21 18:50:27 +0700
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2021-10-21 18:50:27 +0700
commit7c08c6bd138207b862933ee479752a4f1d18c4f2 (patch)
tree879d8a6676dfc36171217d9b44b6e111a95392ab /examples/styling
parentb6ae87ae55301d6c15f56e6c7df077aabe6383de (diff)
downloadiced-7c08c6bd138207b862933ee479752a4f1d18c4f2.tar.gz
iced-7c08c6bd138207b862933ee479752a4f1d18c4f2.tar.bz2
iced-7c08c6bd138207b862933ee479752a4f1d18c4f2.zip
Remove `Renderer` trait for `Checkbox`
Diffstat (limited to 'examples/styling')
-rw-r--r--examples/styling/src/main.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/styling/src/main.rs b/examples/styling/src/main.rs
index 7e9b01ab..5ce54e23 100644
--- a/examples/styling/src/main.rs
+++ b/examples/styling/src/main.rs
@@ -108,7 +108,7 @@ impl Sandbox for Styling {
"Check me!",
Message::CheckboxToggled,
)
- .style(self.theme);
+ .style(self.theme.into());
let toggler = Toggler::new(
self.toggler_value,
@@ -239,11 +239,11 @@ mod style {
}
}
- impl From<Theme> for Box<dyn checkbox::StyleSheet> {
+ impl From<Theme> for &'static dyn checkbox::StyleSheet {
fn from(theme: Theme) -> Self {
match theme {
Theme::Light => Default::default(),
- Theme::Dark => dark::Checkbox.into(),
+ Theme::Dark => &dark::Checkbox,
}
}
}