Wire up container styling to iced_native
This commit is contained in:
parent
edea093350
commit
d61cb58d92
17 changed files with 65 additions and 99 deletions
|
|
@ -19,7 +19,7 @@ pub struct Container<'a, Message> {
|
|||
max_height: u32,
|
||||
horizontal_alignment: alignment::Horizontal,
|
||||
vertical_alignment: alignment::Vertical,
|
||||
style_sheet: Box<dyn StyleSheet>,
|
||||
style_sheet: &'a dyn StyleSheet,
|
||||
content: Element<'a, Message>,
|
||||
}
|
||||
|
||||
|
|
@ -89,8 +89,8 @@ impl<'a, Message> Container<'a, Message> {
|
|||
}
|
||||
|
||||
/// Sets the style of the [`Container`].
|
||||
pub fn style(mut self, style: impl Into<Box<dyn StyleSheet>>) -> Self {
|
||||
self.style_sheet = style.into();
|
||||
pub fn style(mut self, style: &'a dyn StyleSheet) -> Self {
|
||||
self.style_sheet = style;
|
||||
self
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue