Skip to content

Commit 2fa6edf

Browse files
authored
Merge pull request #251 from Plecra/clock-scaling
Rework scaling in clock example
2 parents 3bf938f + 92e1488 commit 2fa6edf

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

examples/clock/src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ impl canvas::Drawable for LocalTime {
133133
frame.stroke(
134134
&hour_and_minute_hands,
135135
canvas::Stroke {
136-
width: 6.0,
136+
width: radius / 100.0 * 3.0,
137137
color: Color::WHITE,
138138
line_cap: canvas::LineCap::Round,
139139
..canvas::Stroke::default()
@@ -148,7 +148,7 @@ impl canvas::Drawable for LocalTime {
148148
frame.stroke(
149149
&second_hand,
150150
canvas::Stroke {
151-
width: 3.0,
151+
width: radius / 100.0,
152152
color: Color::WHITE,
153153
line_cap: canvas::LineCap::Round,
154154
..canvas::Stroke::default()

0 commit comments

Comments
 (0)