add left and right buttons

This commit is contained in:
Jannes Magnusson
2025-10-17 20:19:13 +02:00
parent 851b894e5f
commit 0871852693
6 changed files with 178 additions and 115 deletions

View File

@@ -27,12 +27,6 @@ class TimerView(View):
self.goal_entry.insert(0, "0")
self.goal_entry.pack()
# Timer buttons
self.start_stop_button = ttk.Button(self.ui, text="Start", command=self.toggle_timer)
self.start_stop_button.pack(side=tk.LEFT, padx=2)
self.reset_button = ttk.Button(self.ui, text="Reset", command=self.reset_timer)
self.reset_button.pack(side=tk.LEFT, padx=2)
def toggle_timer(self):
if self.is_running:
@@ -107,20 +101,3 @@ class TimerView(View):
pass
return im
def _draw_progress_arc(self, draw, progress):
"""Draw a progress arc around the outer circle"""
if progress <= 0:
return
# Draw filled arc by drawing multiple lines from center to circumference
center_x, center_y = self.center
# Start from top (270 degrees) and go clockwise
start_angle = 270
num_steps = max(1, int(360 * progress))
for i in range(num_steps):
angle = math.radians(start_angle + i)
end_x = center_x + self.outer_radius * math.cos(angle)
end_y = center_y + self.outer_radius * math.sin(angle)
draw.line([(center_x, center_y), (end_x, end_y)], fill='black', width=1)