Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fixed palette
With these minor changes, all twelve colors are properly displayed in the palette. (As written, only eight of them are visible and four of those are partially cut off by the surrounding frame.)
  • Loading branch information
PeterDrake authored Feb 26, 2024
commit 62ba8dd37bd1427d4168321787e2fc7fb7b63ee3
6 changes: 3 additions & 3 deletions paint_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def setup_widgets(self):
relief=tk.RIDGE,
bg="white",
)
self.color_frame.place(x=10, y=80, width=90, height=180)
self.color_frame.place(x=10, y=80, width=130, height=180)
colors = [
"blue",
"red",
Expand All @@ -52,13 +52,13 @@ def setup_widgets(self):
bg=color,
bd=2,
relief=tk.RIDGE,
width=3,
width=1,
command=lambda col=color: self.select_color(col),
).grid(row=i, column=j, padx=2, pady=2)
i += 1
if i == 4:
i = 0
j = 1
j += 1
self.eraser_btn = tk.Button(
self.root,
text="Eraser",
Expand Down