diff options
author | 2022-05-26 23:58:56 +0200 | |
---|---|---|
committer | 2022-05-26 23:58:56 +0200 | |
commit | d988d813d77bc23147a179586206048e6cc42157 (patch) | |
tree | 70226d18d1255d2cc0bb342fca6c2362f6652611 /examples/game_of_life/src/main.rs | |
parent | d5bc610d0139fb331a59fc904a932d156f637391 (diff) | |
download | iced-d988d813d77bc23147a179586206048e6cc42157.tar.gz iced-d988d813d77bc23147a179586206048e6cc42157.tar.bz2 iced-d988d813d77bc23147a179586206048e6cc42157.zip |
Introduce specific types for each `palette::Extended` field
We will have more control over color calculations for each semantic purpose this way.
Diffstat (limited to 'examples/game_of_life/src/main.rs')
-rw-r--r-- | examples/game_of_life/src/main.rs | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/examples/game_of_life/src/main.rs b/examples/game_of_life/src/main.rs index 080cbac3..fa97583f 100644 --- a/examples/game_of_life/src/main.rs +++ b/examples/game_of_life/src/main.rs @@ -12,8 +12,8 @@ use iced::theme::{self, Theme}; use iced::time; use iced::window; use iced::{ - Alignment, Application, Checkbox, Column, Command, Container, Element, - Length, Row, Settings, Subscription, Text, + Alignment, Application, Checkbox, Column, Command, Element, Length, Row, + Settings, Subscription, Text, }; use preset::Preset; use std::time::{Duration, Instant}; @@ -143,20 +143,19 @@ impl Application for GameOfLife { self.grid.preset(), ); - let content = Column::new() + Column::new() .push( self.grid .view() .map(move |message| Message::Grid(message, version)), ) - .push(controls); - - Container::new(content) - .width(Length::Fill) - .height(Length::Fill) - .style(style::Container) + .push(controls) .into() } + + fn theme(&self) -> Theme { + Theme::Dark + } } mod grid { |