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