Wrap spacers in scrollable as well.

This commit is contained in:
Jeremy Soller 2022-09-30 14:34:22 -06:00
parent 1041af65d6
commit 21efe1546c
No known key found for this signature in database
GPG key ID: 87F211AF2BE4C2FE

View file

@ -120,8 +120,7 @@ impl Sandbox for Window {
},
);
let content: Element<_> = scrollable(
list_view!(
let content: Element<_> = list_view!(
list_section!(
"Debug",
choose_theme,
@ -207,15 +206,16 @@ impl Sandbox for Window {
checkbox("Checkbox", self.checkbox_value, Message::CheckboxToggled),
)
)
)
.into();
container(row![
if self.debug { sidebar.explain(Color::WHITE) } else { sidebar },
scrollable(row![
horizontal_space(Length::Fill),
if self.debug { content.explain(Color::WHITE) } else { content },
horizontal_space(Length::Fill),
])
])
.padding([16, 8])
.width(Length::Fill)
.height(Length::Fill)