From bd521ac62dd77ec40286f86220b92a251122bb33 Mon Sep 17 00:00:00 2001 From: Gergely Polonkai Date: Sat, 21 May 2022 06:58:28 +0200 Subject: [PATCH] [Bugfix] Move the current time box to the bottom between 6:00 and 18:00 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Instead of 7:00 and 17:00; it was’t *that bad the old way, but it’s more balanced this way. --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index e6fac2f..ab9ef2c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -557,7 +557,7 @@ fn gen_svg() -> Document { 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 } else { 0.0 - moon_radius * 1.5 - current_box_height // above the moon