diff options
author | 2022-06-07 05:24:43 +0200 | |
---|---|---|
committer | 2022-06-07 05:24:43 +0200 | |
commit | fc13bb3d65c85cfad9f231c0776d3a45f4fbf480 (patch) | |
tree | 224bbe489cc8e90ab0824c2b745403958667077a /examples/pure/game_of_life | |
parent | f92afa795062cf38f0f99d0a1545a990ed35b09c (diff) | |
download | iced-fc13bb3d65c85cfad9f231c0776d3a45f4fbf480.tar.gz iced-fc13bb3d65c85cfad9f231c0776d3a45f4fbf480.tar.bz2 iced-fc13bb3d65c85cfad9f231c0776d3a45f4fbf480.zip |
Implement theme styling for `Canvas`
Diffstat (limited to 'examples/pure/game_of_life')
-rw-r--r-- | examples/pure/game_of_life/src/main.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/examples/pure/game_of_life/src/main.rs b/examples/pure/game_of_life/src/main.rs index 2af139e8..851fbd47 100644 --- a/examples/pure/game_of_life/src/main.rs +++ b/examples/pure/game_of_life/src/main.rs @@ -3,6 +3,8 @@ mod preset; use grid::Grid; +use preset::Preset; + use iced::executor; use iced::pure::{ button, checkbox, column, container, pick_list, row, slider, text, @@ -12,7 +14,6 @@ use iced::theme::{self, Theme}; use iced::time; use iced::window; use iced::{Alignment, Command, Length, Settings, Subscription}; -use preset::Preset; use std::time::{Duration, Instant}; pub fn main() -> iced::Result { @@ -216,7 +217,7 @@ mod grid { }; use iced::pure::Element; use iced::{ - alignment, mouse, Color, Length, Point, Rectangle, Size, Vector, + alignment, mouse, Color, Length, Point, Rectangle, Size, Theme, Vector, }; use rustc_hash::{FxHashMap, FxHashSet}; use std::future::Future; @@ -525,6 +526,7 @@ mod grid { fn draw( &self, _interaction: &Interaction, + _theme: &Theme, bounds: Rectangle, cursor: Cursor, ) -> Vec<Geometry> { |