Let a Theme control the background color of an application
... and remove `Application::background_color`
This commit is contained in:
parent
2cfb307f8c
commit
03eda9b162
9 changed files with 33 additions and 79 deletions
|
|
@ -12,7 +12,7 @@ use iced::pure::{Application, Element};
|
|||
use iced::theme::{self, Theme};
|
||||
use iced::time;
|
||||
use iced::window;
|
||||
use iced::{Alignment, Color, Command, Length, Settings, Subscription};
|
||||
use iced::{Alignment, Command, Length, Settings, Subscription};
|
||||
use preset::Preset;
|
||||
use std::time::{Duration, Instant};
|
||||
|
||||
|
|
@ -71,10 +71,6 @@ impl Application for GameOfLife {
|
|||
String::from("Game of Life - Iced")
|
||||
}
|
||||
|
||||
fn background_color(&self) -> Color {
|
||||
style::BACKGROUND
|
||||
}
|
||||
|
||||
fn update(&mut self, message: Message) -> Command<Message> {
|
||||
match message {
|
||||
Message::Grid(message, version) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue