Reintroduce Box for style_sheet in Checkbox
This commit is contained in:
parent
d36ce33a95
commit
fcc282bd76
4 changed files with 26 additions and 11 deletions
|
|
@ -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(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue