summaryrefslogtreecommitdiffstats
path: root/examples/styling/src/main.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2021-10-31 16:58:02 +0700
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2021-10-31 16:58:02 +0700
commitfcc282bd76c88f389d510411b0ae73e1a4eaf317 (patch)
tree407ad2d80b9a87064787bd3f4b5ee5f3188b4cda /examples/styling/src/main.rs
parentd36ce33a95c277ee8fe45555df17daf21ef02ef8 (diff)
downloadiced-fcc282bd76c88f389d510411b0ae73e1a4eaf317.tar.gz
iced-fcc282bd76c88f389d510411b0ae73e1a4eaf317.tar.bz2
iced-fcc282bd76c88f389d510411b0ae73e1a4eaf317.zip
Reintroduce `Box` for `style_sheet` in `Checkbox`
Diffstat (limited to '')
-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 9e31c383..e8829b53 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.into());
+ .style(self.theme);
let toggler = Toggler::new(
self.toggler_value,
@@ -239,11 +239,11 @@ mod style {
}
}
- impl From<Theme> for &'static dyn checkbox::StyleSheet {
+ impl<'a> From<Theme> for Box<dyn checkbox::StyleSheet + 'a> {
fn from(theme: Theme) -> Self {
match theme {
Theme::Light => Default::default(),
- Theme::Dark => &dark::Checkbox,
+ Theme::Dark => dark::Checkbox.into(),
}
}
}