Reintroduce Box for style_sheet in Radio
This commit is contained in:
parent
d758006ee9
commit
bd7b086ec1
6 changed files with 29 additions and 14 deletions
|
|
@ -64,7 +64,7 @@ impl Sandbox for Styling {
|
|||
Some(self.theme),
|
||||
Message::ThemeChanged,
|
||||
)
|
||||
.style(self.theme.into()),
|
||||
.style(self.theme),
|
||||
)
|
||||
},
|
||||
);
|
||||
|
|
@ -185,11 +185,11 @@ mod style {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<Theme> for &'static dyn radio::StyleSheet {
|
||||
impl<'a> From<Theme> for Box<dyn radio::StyleSheet + 'a> {
|
||||
fn from(theme: Theme) -> Self {
|
||||
match theme {
|
||||
Theme::Light => Default::default(),
|
||||
Theme::Dark => &dark::Radio,
|
||||
Theme::Dark => dark::Radio.into(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue