From e0aa06c7ba7768efab6bda4e9b68acbb3b8b6e65 Mon Sep 17 00:00:00 2001 From: admar Date: Sat, 27 May 2023 10:12:48 +0200 Subject: [PATCH] Save address when saving settings + change length of hands to match colored circles --- clock.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/clock.py b/clock.py index 7f10b3a..01326a4 100644 --- a/clock.py +++ b/clock.py @@ -185,6 +185,8 @@ class ClockSettings(): j["alarm_activated"] = self.alarm_activated j["alarm_time_hour"] = self.alarm_time.hour j["alarm_time_minute"] = self.alarm_time.minute + if hasattr(self, "address"): + j["address"] = self.address with open("settings.json", "w") as f: json.dump(j, f, indent=4) @@ -948,8 +950,8 @@ class MyClockWidget(FloatLayout): hands = self.ids["hands"] seconds_hand = self.position_on_clock(t.second/60, length=0.45*hands.size[0]) - minutes_hand = self.position_on_clock(t.minute/60+t.second/3600, length=0.40*hands.size[0]) - hours_hand = self.position_on_clock(t.hour/12 + t.minute/720, length=0.35*hands.size[0]) + minutes_hand = self.position_on_clock(t.minute/60+t.second/3600, length=0.38*hands.size[0]) + hours_hand = self.position_on_clock(t.hour/12 + t.minute/720, length=0.32*hands.size[0]) self.draw_list_curr_frame.append(["canvas.clear()", hands]) update_rate = App.get_running_app().update_rate