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/style.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/style.rs')
-rw-r--r-- | examples/game_of_life/src/style.rs | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/examples/game_of_life/src/style.rs b/examples/game_of_life/src/style.rs index ea215dd8..69889889 100644 --- a/examples/game_of_life/src/style.rs +++ b/examples/game_of_life/src/style.rs @@ -1,4 +1,4 @@ -use iced::{container, pick_list, Background, Color}; +use iced::{pick_list, Color}; const BACKGROUND: Color = Color::from_rgb( 0x2F as f32 / 255.0, @@ -6,20 +6,6 @@ const BACKGROUND: Color = Color::from_rgb( 0x36 as f32 / 255.0, ); -pub struct Container; - -impl container::StyleSheet for Container { - fn style(&self) -> container::Style { - container::Style { - background: Some(Background::Color(Color::from_rgb8( - 0x36, 0x39, 0x3F, - ))), - text_color: Some(Color::WHITE), - ..container::Style::default() - } - } -} - pub struct PickList; impl pick_list::StyleSheet for PickList { |