From 62ba8dd37bd1427d4168321787e2fc7fb7b63ee3 Mon Sep 17 00:00:00 2001 From: Peter Drake Date: Mon, 26 Feb 2024 09:35:50 -0800 Subject: [PATCH] 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.) --- paint_app.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/paint_app.py b/paint_app.py index 1850341..90d405c 100644 --- a/paint_app.py +++ b/paint_app.py @@ -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", @@ -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",