summaryrefslogtreecommitdiffstats
path: root/examples/tour/src/main.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector0193@gmail.com>2021-06-10 18:47:39 +0700
committerLibravatar Héctor Ramón <hector0193@gmail.com>2021-06-10 18:58:44 +0700
commitd1797dda877a7012d16981a399c5e6d4b8daf2bf (patch)
tree07038eb91f05964c0441a7cd92607f3efc67e440 /examples/tour/src/main.rs
parentd46dd67a91731177406570aae5e921a728b8c2b4 (diff)
downloadiced-d1797dda877a7012d16981a399c5e6d4b8daf2bf.tar.gz
iced-d1797dda877a7012d16981a399c5e6d4b8daf2bf.tar.bz2
iced-d1797dda877a7012d16981a399c5e6d4b8daf2bf.zip
Revert changes in `tour` example
Diffstat (limited to '')
-rw-r--r--examples/tour/src/main.rs20
1 files changed, 8 insertions, 12 deletions
diff --git a/examples/tour/src/main.rs b/examples/tour/src/main.rs
index 626d2b52..1215f83d 100644
--- a/examples/tour/src/main.rs
+++ b/examples/tour/src/main.rs
@@ -70,15 +70,13 @@ impl Sandbox for Tour {
controls = controls.push(Space::with_width(Length::Fill));
- let mut button = button(next_button, "Next");
- button = if steps.can_continue() {
- button
- .style(style::Button::Primary)
- .on_press(Message::NextPressed)
- } else {
- button.style(style::Button::Disabled)
- };
- controls = controls.push(button);
+ if steps.can_continue() {
+ controls = controls.push(
+ button(next_button, "Next")
+ .on_press(Message::NextPressed)
+ .style(style::Button::Primary),
+ );
+ }
let content: Element<_> = Column::new()
.max_width(540)
@@ -792,7 +790,6 @@ mod style {
pub enum Button {
Primary,
Secondary,
- Disabled,
}
impl button::StyleSheet for Button {
@@ -800,8 +797,7 @@ mod style {
button::Style {
background: Some(Background::Color(match self {
Button::Primary => Color::from_rgb(0.11, 0.42, 0.87),
- Button::Secondary => Color::from_rgb(0.055, 0.21, 0.435),
- Button::Disabled => Color::from_rgb(0.5, 0.5, 0.5),
+ Button::Secondary => Color::from_rgb(0.5, 0.5, 0.5),
})),
border_radius: 12.0,
shadow_offset: Vector::new(1.0, 1.0),