[Bugfix] Move the current time box to the bottom between 6:00 and 18:00

Instead of 7:00 and 17:00; it was’t *that bad the old way, but it’s more balanced this way.
This commit is contained in:
Gergely Polonkai 2022-05-21 06:58:28 +02:00
parent bede824603
commit bd521ac62d
No known key found for this signature in database
GPG Key ID: 2D2885533B869ED4

View File

@ -557,7 +557,7 @@ fn gen_svg() -> Document {
local_hour, local_minute, local_second local_hour, local_minute, local_second
))); )));
let top_pos = if local_hour > 6 && local_hour < 18 { let top_pos = if (6..=18).contains(&local_hour) {
moon_radius * 1.5 // under the moon moon_radius * 1.5 // under the moon
} else { } else {
0.0 - moon_radius * 1.5 - current_box_height // above the moon 0.0 - moon_radius * 1.5 - current_box_height // above the moon