Merge pull request 'updated image icon preview to hoepfully work with macos as well' (#9) from image_macos_support into develop

Reviewed-on: Berufsschule/Veracity_AI#9
This commit is contained in:
Falko Victor Habel 2024-10-08 10:18:24 +00:00
commit dbeb1511ec
2 changed files with 8 additions and 1 deletions

View File

@ -1,6 +1,10 @@
import customtkinter
from views.mainScreen import MainFrame
from controller.mainFrameController import MainFrameController
import os
from PIL import ImageTk
class Main(customtkinter.CTk):
def __init__(self) -> None:
@ -9,7 +13,10 @@ class Main(customtkinter.CTk):
self.grid_rowconfigure(0, weight=1)
self.grid_columnconfigure(0, weight=1)
self.iconbitmap("src/ui/logo.png")
self.iconpath = ImageTk.PhotoImage(file=os.path.join("src/ui","logo.png"))
self.wm_iconbitmap()
self.iconphoto(False, self.iconpath)
main_frame = MainFrame(self)
main_frame.grid(row=0, column=0, padx=10, pady=10,sticky="nsew")
controller_mainframe = MainFrameController(main_frame)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 389 KiB

After

Width:  |  Height:  |  Size: 127 KiB