summaryrefslogtreecommitdiffstats
path: root/examples/tour/src/main.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2023-05-19 03:43:11 +0200
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2023-05-19 03:43:11 +0200
commit96aa0379d58ff799493097e3bd0572f9a87da453 (patch)
treebb3cb685a45244d3b63e423b260f36a6759673bb /examples/tour/src/main.rs
parent59663d2e45c3c4487fb64f781eb0d0f422763467 (diff)
downloadiced-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.rs14
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)),
);
}