summaryrefslogtreecommitdiffstats
path: root/examples/clock
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-03-16 19:49:54 +0100
committerLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-03-16 19:49:54 +0100
commit36b73781f1fed0b4918d34932c2dcd17fa55cbe5 (patch)
treea1b7be4430e57300afcf200c6b45fe2bb61cfa5a /examples/clock
parent4f6a9ba88951a53ba3ce66f2b00ba75c2553baa1 (diff)
downloadiced-36b73781f1fed0b4918d34932c2dcd17fa55cbe5.tar.gz
iced-36b73781f1fed0b4918d34932c2dcd17fa55cbe5.tar.bz2
iced-36b73781f1fed0b4918d34932c2dcd17fa55cbe5.zip
Scale theme name in `clock` example
Diffstat (limited to 'examples/clock')
-rw-r--r--examples/clock/src/main.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/clock/src/main.rs b/examples/clock/src/main.rs
index 318ca74c..e3f3fa34 100644
--- a/examples/clock/src/main.rs
+++ b/examples/clock/src/main.rs
@@ -145,10 +145,10 @@ impl<Message> canvas::Program<Message> for Clock {
frame.rotate(Degrees(-90.0 * rotate_factor));
frame.fill_text(canvas::Text {
content: theme.to_string(),
- size: 15.into(),
+ size: (radius / 15.0).into(),
position: Point::new(
- (0.8 * radius - 8.0) * rotate_factor,
- -8.0,
+ (0.78 * radius) * rotate_factor,
+ -width * 2.0,
),
color: palette.primary.weak.text,
horizontal_alignment: if rotate_factor > 0.0 {