Reintroduce Box for style_sheet in Container
This commit is contained in:
parent
fcc282bd76
commit
40a5de5811
12 changed files with 51 additions and 30 deletions
|
|
@ -149,7 +149,7 @@ impl Sandbox for Styling {
|
|||
.height(Length::Fill)
|
||||
.center_x()
|
||||
.center_y()
|
||||
.style(self.theme.into())
|
||||
.style(self.theme)
|
||||
.into()
|
||||
}
|
||||
}
|
||||
|
|
@ -176,11 +176,11 @@ mod style {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<Theme> for &'static dyn container::StyleSheet {
|
||||
impl<'a> From<Theme> for Box<dyn container::StyleSheet + 'a> {
|
||||
fn from(theme: Theme) -> Self {
|
||||
match theme {
|
||||
Theme::Light => Default::default(),
|
||||
Theme::Dark => &dark::Container,
|
||||
Theme::Dark => dark::Container.into(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue