Wire up styling to Button in iced_native
This commit is contained in:
parent
95acc1deb8
commit
3140cdc4ba
12 changed files with 55 additions and 96 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue