Wire up styling to Radio in iced_native
This commit is contained in:
parent
cc560aca18
commit
d39ad717ed
11 changed files with 97 additions and 135 deletions
|
|
@ -76,7 +76,7 @@ impl Sandbox for ScrollableDemo {
|
|||
Some(*theme),
|
||||
Message::ThemeChanged,
|
||||
)
|
||||
.style(*theme),
|
||||
.style(theme.clone().into()),
|
||||
)
|
||||
},
|
||||
);
|
||||
|
|
|
|||
|
|
@ -25,11 +25,11 @@ impl From<Theme> for &'static dyn container::StyleSheet {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<Theme> for Box<dyn radio::StyleSheet> {
|
||||
impl From<Theme> for &'static dyn radio::StyleSheet {
|
||||
fn from(theme: Theme) -> Self {
|
||||
match theme {
|
||||
Theme::Light => Default::default(),
|
||||
Theme::Dark => dark::Radio.into(),
|
||||
Theme::Dark => &dark::Radio,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue