We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6195adf commit 2a9ed1eCopy full SHA for 2a9ed1e
1 file changed
examples/clock.py
100755
100644
@@ -36,10 +36,10 @@ def main():
36
now = datetime.datetime.now()
37
today_date = now.strftime("%d %b %y")
38
39
- margin = 4
+ margin = 5
40
41
cx = 30
42
- cy = min(device.height, 64) / 2
+ cy = min(device.height, 60) / 2
43
44
left = cx - cy
45
right = cx + cy
@@ -58,8 +58,9 @@ def main():
58
draw.line((cx, cy, cx + mins[0], cy + mins[1]), fill="white")
59
draw.line((cx, cy, cx + secs[0], cy + secs[1]), fill="red")
60
draw.ellipse((cx - 2, cy - 2, cx + 2, cy + 2), fill="white", outline="white")
61
- draw.text((2 * (cx + margin), cy - 8), today_date, fill="yellow")
62
- draw.text((2 * (cx + margin), cy), today_time, fill="yellow")
+ text_x = 2 * (cx + margin)
+ draw.text((text_x, cy - 10), today_date, fill="yellow")
63
+ draw.text((text_x, cy + 2), today_time, fill="yellow")
64
65
time.sleep(0.1)
66
0 commit comments