Scale theme name in clock example

This commit is contained in:
Héctor Ramón Jiménez 2024-03-16 19:49:54 +01:00
parent 4f6a9ba889
commit 36b73781f1
No known key found for this signature in database
GPG key ID: 7CC46565708259A7

View file

@ -145,10 +145,10 @@ impl<Message> canvas::Program<Message> for Clock {
frame.rotate(Degrees(-90.0 * rotate_factor)); frame.rotate(Degrees(-90.0 * rotate_factor));
frame.fill_text(canvas::Text { frame.fill_text(canvas::Text {
content: theme.to_string(), content: theme.to_string(),
size: 15.into(), size: (radius / 15.0).into(),
position: Point::new( position: Point::new(
(0.8 * radius - 8.0) * rotate_factor, (0.78 * radius) * rotate_factor,
-8.0, -width * 2.0,
), ),
color: palette.primary.weak.text, color: palette.primary.weak.text,
horizontal_alignment: if rotate_factor > 0.0 { horizontal_alignment: if rotate_factor > 0.0 {