summaryrefslogtreecommitdiffstats
path: root/examples/clock
diff options
context:
space:
mode:
authorLibravatar Marli Frost <marli@frost.red>2020-04-01 23:02:33 +0100
committerLibravatar Marli Frost <marli@frost.red>2020-04-01 23:19:56 +0100
commit08da96c1c6f52ec35fb8844d93bd2b5582c9abb8 (patch)
treea92e641c2742e520711dcbefaa6fb932031bbb5d /examples/clock
parent3bf938f65fcaa5c954015f6d016b859f1d25152b (diff)
downloadiced-08da96c1c6f52ec35fb8844d93bd2b5582c9abb8.tar.gz
iced-08da96c1c6f52ec35fb8844d93bd2b5582c9abb8.tar.bz2
iced-08da96c1c6f52ec35fb8844d93bd2b5582c9abb8.zip
Scale the clock hands to the same size as the face
Diffstat (limited to 'examples/clock')
-rw-r--r--examples/clock/src/main.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/clock/src/main.rs b/examples/clock/src/main.rs
index d3a4261b..66c311b5 100644
--- a/examples/clock/src/main.rs
+++ b/examples/clock/src/main.rs
@@ -133,7 +133,7 @@ impl canvas::Drawable for LocalTime {
frame.stroke(
&hour_and_minute_hands,
canvas::Stroke {
- width: 6.0,
+ width: radius / 100. * 3.,
color: Color::WHITE,
line_cap: canvas::LineCap::Round,
..canvas::Stroke::default()
@@ -148,7 +148,7 @@ impl canvas::Drawable for LocalTime {
frame.stroke(
&second_hand,
canvas::Stroke {
- width: 3.0,
+ width: radius / 100.,
color: Color::WHITE,
line_cap: canvas::LineCap::Round,
..canvas::Stroke::default()