diff options
author | 2021-10-31 16:58:02 +0700 | |
---|---|---|
committer | 2021-10-31 16:58:02 +0700 | |
commit | fcc282bd76c88f389d510411b0ae73e1a4eaf317 (patch) | |
tree | 407ad2d80b9a87064787bd3f4b5ee5f3188b4cda /examples/styling/src/main.rs | |
parent | d36ce33a95c277ee8fe45555df17daf21ef02ef8 (diff) | |
download | iced-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.rs | 6 |
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(), } } } |