Reintroduce Element::explain
This commit is contained in:
parent
da7e859840
commit
a07cb8588f
2 changed files with 193 additions and 13 deletions
|
|
@ -69,16 +69,24 @@ impl Sandbox for Tour {
|
|||
);
|
||||
}
|
||||
|
||||
let content = column![
|
||||
let content: Element<_> = column![
|
||||
steps.view(self.debug).map(Message::StepMessage),
|
||||
controls,
|
||||
]
|
||||
.max_width(540)
|
||||
.spacing(20)
|
||||
.padding(20);
|
||||
.padding(20)
|
||||
.into();
|
||||
|
||||
let scrollable =
|
||||
scrollable(container(content).width(Length::Fill).center_x());
|
||||
let scrollable = scrollable(
|
||||
container(if self.debug {
|
||||
content.explain(Color::BLACK)
|
||||
} else {
|
||||
content
|
||||
})
|
||||
.width(Length::Fill)
|
||||
.center_x(),
|
||||
);
|
||||
|
||||
container(scrollable).height(Length::Fill).center_y().into()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue