diff options
author | 2023-05-19 03:43:11 +0200 | |
---|---|---|
committer | 2023-05-19 03:43:11 +0200 | |
commit | 96aa0379d58ff799493097e3bd0572f9a87da453 (patch) | |
tree | bb3cb685a45244d3b63e423b260f36a6759673bb /examples/tour/src/main.rs | |
parent | 59663d2e45c3c4487fb64f781eb0d0f422763467 (diff) | |
download | iced-96aa0379d58ff799493097e3bd0572f9a87da453.tar.gz iced-96aa0379d58ff799493097e3bd0572f9a87da453.tar.bz2 iced-96aa0379d58ff799493097e3bd0572f9a87da453.zip |
Implement `custom` helper for `theme::Button`
Diffstat (limited to '')
-rw-r--r-- | examples/tour/src/main.rs | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/examples/tour/src/main.rs b/examples/tour/src/main.rs index a40f0f33..257a4def 100644 --- a/examples/tour/src/main.rs +++ b/examples/tour/src/main.rs @@ -57,11 +57,9 @@ impl Sandbox for Tour { if steps.has_previous() { controls = controls.push( - button("Back").on_press(Message::BackPressed).style( - theme::Button::Custom(Box::new( - CustomButtonStyle::Secondary, - )), - ), + button("Back") + .on_press(Message::BackPressed) + .style(theme::Button::custom(CustomButtonStyle::Secondary)), ); } @@ -69,9 +67,9 @@ impl Sandbox for Tour { if steps.can_continue() { controls = controls.push( - button("Next").on_press(Message::NextPressed).style( - theme::Button::Custom(Box::new(CustomButtonStyle::Primary)), - ), + button("Next") + .on_press(Message::NextPressed) + .style(theme::Button::custom(CustomButtonStyle::Primary)), ); } |