summaryrefslogtreecommitdiffstats
path: root/examples/clock
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2022-06-07 05:24:43 +0200
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2022-06-07 05:24:43 +0200
commitfc13bb3d65c85cfad9f231c0776d3a45f4fbf480 (patch)
tree224bbe489cc8e90ab0824c2b745403958667077a /examples/clock
parentf92afa795062cf38f0f99d0a1545a990ed35b09c (diff)
downloadiced-fc13bb3d65c85cfad9f231c0776d3a45f4fbf480.tar.gz
iced-fc13bb3d65c85cfad9f231c0776d3a45f4fbf480.tar.bz2
iced-fc13bb3d65c85cfad9f231c0776d3a45f4fbf480.zip
Implement theme styling for `Canvas`
Diffstat (limited to 'examples/clock')
-rw-r--r--examples/clock/src/main.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/examples/clock/src/main.rs b/examples/clock/src/main.rs
index fa4181a9..48b4cd7b 100644
--- a/examples/clock/src/main.rs
+++ b/examples/clock/src/main.rs
@@ -81,7 +81,12 @@ impl Application for Clock {
}
impl<Message> canvas::Program<Message> for Clock {
- fn draw(&self, bounds: Rectangle, _cursor: Cursor) -> Vec<Geometry> {
+ fn draw(
+ &self,
+ _theme: &Theme,
+ bounds: Rectangle,
+ _cursor: Cursor,
+ ) -> Vec<Geometry> {
let clock = self.clock.draw(bounds.size(), |frame| {
let center = frame.center();
let radius = frame.width().min(frame.height()) / 2.0;