Implement custom helper for theme::Button
This commit is contained in:
parent
59663d2e45
commit
96aa0379d5
2 changed files with 15 additions and 8 deletions
|
|
@ -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)),
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue