Draw scrollbar in Widget::draw for Scrollable
This commit is contained in:
parent
a4f4d83161
commit
54a9a232f8
11 changed files with 132 additions and 196 deletions
|
|
@ -95,7 +95,7 @@ impl Sandbox for ScrollableDemo {
|
|||
.on_scroll(move |offset| {
|
||||
Message::Scrolled(i, offset)
|
||||
})
|
||||
.style(*theme)
|
||||
.style(theme.clone().into())
|
||||
.push(Text::new(variant.title))
|
||||
.push(
|
||||
Button::new(
|
||||
|
|
|
|||
|
|
@ -34,11 +34,11 @@ impl From<Theme> for Box<dyn radio::StyleSheet> {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<Theme> for Box<dyn scrollable::StyleSheet> {
|
||||
impl From<Theme> for &'static dyn scrollable::StyleSheet {
|
||||
fn from(theme: Theme) -> Self {
|
||||
match theme {
|
||||
Theme::Light => Default::default(),
|
||||
Theme::Dark => dark::Scrollable.into(),
|
||||
Theme::Dark => &dark::Scrollable,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue