Merge pull request #251 from Plecra/clock-scaling

Rework scaling in clock example
This commit is contained in:
Héctor Ramón 2020-04-02 01:11:38 +02:00 committed by GitHub
commit 2fa6edf7a8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -133,7 +133,7 @@ impl canvas::Drawable for LocalTime {
frame.stroke(
&hour_and_minute_hands,
canvas::Stroke {
width: 6.0,
width: radius / 100.0 * 3.0,
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.0,
color: Color::WHITE,
line_cap: canvas::LineCap::Round,
..canvas::Stroke::default()