Reintroduce Box for style_sheet in Button

This commit is contained in:
Héctor Ramón Jiménez 2021-10-31 16:53:18 +07:00
parent 661cb5736e
commit d36ce33a95
No known key found for this signature in database
GPG key ID: 140CC052C94F138E
10 changed files with 42 additions and 30 deletions

View file

@ -112,15 +112,15 @@ impl Application for Stopwatch {
let toggle_button = {
let (label, color) = match self.state {
State::Idle => ("Start", &style::Button::Primary),
State::Ticking { .. } => ("Stop", &style::Button::Destructive),
State::Idle => ("Start", style::Button::Primary),
State::Ticking { .. } => ("Stop", style::Button::Destructive),
};
button(&mut self.toggle, label, color).on_press(Message::Toggle)
};
let reset_button =
button(&mut self.reset, "Reset", &style::Button::Secondary)
button(&mut self.reset, "Reset", style::Button::Secondary)
.on_press(Message::Reset);
let controls = Row::new()