diff options
author | 2019-11-24 19:15:28 +0100 | |
---|---|---|
committer | 2019-11-24 19:15:28 +0100 | |
commit | bbcd16c3358e641b8ab1877b802d1f7c5709943d (patch) | |
tree | 72c805ce46792f3c038d2d7ea127263ae965a779 /examples/tour.rs | |
parent | 700390bdb297a5fc2eb356b10f9ed2656cc75daa (diff) | |
parent | 2b2a0f12c75032453fbefd2491d3ef51ff0ba88e (diff) | |
download | iced-bbcd16c3358e641b8ab1877b802d1f7c5709943d.tar.gz iced-bbcd16c3358e641b8ab1877b802d1f7c5709943d.tar.bz2 iced-bbcd16c3358e641b8ab1877b802d1f7c5709943d.zip |
Merge pull request #66 from hecrj/feature/new-web-tour
Make `tour` work with `iced_web` again
Diffstat (limited to 'examples/tour.rs')
-rw-r--r-- | examples/tour.rs | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/examples/tour.rs b/examples/tour.rs index 8dbae2b8..f5d3f28d 100644 --- a/examples/tour.rs +++ b/examples/tour.rs @@ -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.")) } |