Remove theme method in stopwatch example

This commit is contained in:
Héctor Ramón Jiménez 2025-12-05 03:38:28 +01:00
parent ee3b3c86eb
commit 281dda733c
No known key found for this signature in database
GPG key ID: 7CC46565708259A7

View file

@ -1,12 +1,11 @@
use iced::keyboard; use iced::keyboard;
use iced::time::{self, Duration, Instant, milliseconds}; use iced::time::{self, Duration, Instant, milliseconds};
use iced::widget::{button, center, column, row, text}; use iced::widget::{button, center, column, row, text};
use iced::{Center, Element, Subscription, Theme}; use iced::{Center, Element, Subscription};
pub fn main() -> iced::Result { pub fn main() -> iced::Result {
iced::application(Stopwatch::default, Stopwatch::update, Stopwatch::view) iced::application(Stopwatch::default, Stopwatch::update, Stopwatch::view)
.subscription(Stopwatch::subscription) .subscription(Stopwatch::subscription)
.theme(Stopwatch::theme)
.run() .run()
} }
@ -124,8 +123,4 @@ impl Stopwatch {
center(content).into() center(content).into()
} }
fn theme(&self) -> Theme {
Theme::Dark
}
} }