Merge pull request #66 from hecrj/feature/new-web-tour

Make `tour` work with `iced_web` again
This commit is contained in:
Héctor Ramón 2019-11-24 19:15:28 +01:00 committed by GitHub
commit bbcd16c335
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 936 additions and 87 deletions

View file

@ -622,11 +622,19 @@ impl<'a> Step {
"Give it a shot! Check the following checkbox to be able to \
see element boundaries.",
))
.push(Checkbox::new(
debug,
"Explain layout",
StepMessage::DebugToggled,
))
.push(if cfg!(target_arch = "wasm32") {
Element::new(
Text::new("Not available on web yet!")
.color([0.7, 0.7, 0.7])
.horizontal_alignment(HorizontalAlignment::Center),
)
} else {
Element::new(Checkbox::new(
debug,
"Explain layout",
StepMessage::DebugToggled,
))
})
.push(Text::new("Feel free to go back and take a look."))
}