Skip to content

Commit

Permalink
tomato.py: centre button
Browse files Browse the repository at this point in the history
  • Loading branch information
thirdr committed Feb 28, 2025
1 parent be39d59 commit 54a4dce
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions examples/tomato.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def __init__(self):
self.foreground_rect.rectangle(10, 10, WIDTH - 20, HEIGHT - 120, (10, 10, 10, 10))

# Touch button
self.start_button = Button(CX - 56, HEIGHT - 75, CX - 2, 50)
self.start_button = Button(CX // 2, HEIGHT - 75, CX, 50)
x, y, w, h = self.start_button.bounds
self.start = Polygon()
self.start.rectangle(x, y, w, h, (10, 10, 10, 10))
Expand Down Expand Up @@ -109,9 +109,9 @@ def draw(self):
if self.is_break_time:
vector.text("Start Break", self.start_button.bounds[0] + 8, self.start_button.bounds[1] + 33)
else:
vector.text("Start Task", self.start_button.bounds[0] + 12, self.start_button.bounds[1] + 33)
vector.text("Start Task", self.start_button.bounds[0] + 13, self.start_button.bounds[1] + 33)
elif self.running and self.paused:
vector.text("Resume", self.start_button.bounds[0] + 22, self.start_button.bounds[1] + 33)
vector.text("Resume", self.start_button.bounds[0] + 24, self.start_button.bounds[1] + 33)
else:
vector.text("Pause", self.start_button.bounds[0] + 32, self.start_button.bounds[1] + 33)

Expand Down

0 comments on commit 54a4dce

Please sign in to comment.