Simplify theming for Button widget

This commit is contained in:
Héctor Ramón Jiménez 2024-03-04 20:42:37 +01:00
parent db92e1c942
commit f4a4845ddb
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
16 changed files with 306 additions and 412 deletions

View file

@ -1,11 +1,11 @@
use iced::alignment;
use iced::executor;
use iced::keyboard;
use iced::theme::{self, Theme};
use iced::time;
use iced::widget::{button, column, container, row, text};
use iced::{
Alignment, Application, Command, Element, Length, Settings, Subscription,
Theme,
};
use std::time::{Duration, Instant};
@ -136,7 +136,7 @@ impl Application for Stopwatch {
};
let reset_button = button("Reset")
.style(theme::Button::Destructive)
.style(button::destructive)
.on_press(Message::Reset);
let controls = row![toggle_button, reset_button].spacing(20);