diff options
author | 2022-06-07 05:24:43 +0200 | |
---|---|---|
committer | 2022-06-07 05:24:43 +0200 | |
commit | fc13bb3d65c85cfad9f231c0776d3a45f4fbf480 (patch) | |
tree | 224bbe489cc8e90ab0824c2b745403958667077a /examples/bezier_tool | |
parent | f92afa795062cf38f0f99d0a1545a990ed35b09c (diff) | |
download | iced-fc13bb3d65c85cfad9f231c0776d3a45f4fbf480.tar.gz iced-fc13bb3d65c85cfad9f231c0776d3a45f4fbf480.tar.bz2 iced-fc13bb3d65c85cfad9f231c0776d3a45f4fbf480.zip |
Implement theme styling for `Canvas`
Diffstat (limited to 'examples/bezier_tool')
-rw-r--r-- | examples/bezier_tool/src/main.rs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/examples/bezier_tool/src/main.rs b/examples/bezier_tool/src/main.rs index 35b5182c..11e4828e 100644 --- a/examples/bezier_tool/src/main.rs +++ b/examples/bezier_tool/src/main.rs @@ -71,7 +71,7 @@ mod bezier { use iced::{ canvas::event::{self, Event}, canvas::{self, Canvas, Cursor, Frame, Geometry, Path, Stroke}, - mouse, Element, Length, Point, Rectangle, + mouse, Element, Length, Point, Rectangle, Theme, }; #[derive(Default)] @@ -158,7 +158,12 @@ mod bezier { } } - fn draw(&self, bounds: Rectangle, cursor: Cursor) -> Vec<Geometry> { + fn draw( + &self, + _theme: &Theme, + bounds: Rectangle, + cursor: Cursor, + ) -> Vec<Geometry> { let content = self.state.cache.draw(bounds.size(), |frame: &mut Frame| { Curve::draw_all(self.curves, frame); |