From b31e9f3dd1a9b02eb53c82ad03741b1c8821bc45 Mon Sep 17 00:00:00 2001 From: nn2-minh <Nguyen12.Minh@live.uwe.ac.uk> Date: Mon, 17 Mar 2025 22:59:50 +0700 Subject: [PATCH] Fix color for main.py in the frontend --- app/frontend/main.py | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/app/frontend/main.py b/app/frontend/main.py index 62b98c4..7deb904 100644 --- a/app/frontend/main.py +++ b/app/frontend/main.py @@ -1,4 +1,3 @@ -# main.py import customtkinter as ctk from components.auth.login import login_frame from components.auth.register import register_frame @@ -28,7 +27,7 @@ ctk.set_default_color_theme("blue") root = ctk.CTk() root.title("Shopping App") -root.geometry("900x800") +root.geometry("1000x800") # Create Frames login = login_frame(root, switch_frame, API_URL) @@ -37,9 +36,7 @@ create_shop = create_shop_frame(root, switch_frame, API_URL, access_token) view_shop = view_shop_frame(root, switch_frame, API_URL, access_token) product = product_frame(root, switch_frame, API_URL, access_token) category = category_frame(root, switch_frame, API_URL, access_token) -dashboard = dashboard_frame( - root, switch_frame, API_URL, access_token -) # new dashboard frame +dashboard = dashboard_frame(root, switch_frame, API_URL, access_token) frames = { "login": login, @@ -48,13 +45,13 @@ frames = { "create_product": product, "category": category, "view_shop": view_shop, - "dashboard": dashboard, # add dashboard here + "dashboard": dashboard, } for frame in frames.values(): - frame.place(relx=0, rely=0, relwidth=1, relheight=0.8) + frame.place(relx=0, rely=0, relwidth=1, relheight=1) # Adjusted height for full scaling -# Show the login frame first (or switch to dashboard as needed) -switch_frame("login") # switch to dashboard +# Show the login frame first +switch_frame("login") root.mainloop() -- GitLab