Skip to content
Snippets Groups Projects
Commit dcfe6bf8 authored by Nguyễn Minh's avatar Nguyễn Minh
Browse files

adjust image path in login.py

parent 2eb4ceed
No related branches found
No related tags found
No related merge requests found
Pipeline #8915 failed
import customtkinter as ctk import customtkinter as ctk
import os
from tkinter import messagebox from tkinter import messagebox
from PIL import Image from PIL import Image
from utils.api_requests import login_api from utils.api_requests import login_api
...@@ -15,7 +16,7 @@ def login_frame(parent, switch_func, API_URL): ...@@ -15,7 +16,7 @@ def login_frame(parent, switch_func, API_URL):
left_frame = ctk.CTkFrame(container, fg_color="transparent") left_frame = ctk.CTkFrame(container, fg_color="transparent")
left_frame.grid(row=0, column=0, sticky="nsew") left_frame.grid(row=0, column=0, sticky="nsew")
image_path = "../../app/static/front_end_img/login.jpg" image_path = os.path.abspath("app/static/front_end_img/login.jpg")
img = ctk.CTkImage(light_image=Image.open(image_path), size=(800, 800)) img = ctk.CTkImage(light_image=Image.open(image_path), size=(800, 800))
image_label = ctk.CTkLabel(left_frame, image=img, text="") image_label = ctk.CTkLabel(left_frame, image=img, text="")
image_label.place(relwidth=1, relheight=1) image_label.place(relwidth=1, relheight=1)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment