Merge pull request 'Open icon via Icons Class' (#25) from added_icon into main

Reviewed-on: Fabelous/mpenn#25
This commit is contained in:
Falko Victor Habel 2024-04-04 10:22:11 +00:00
commit eb546d3af1
2 changed files with 44 additions and 11 deletions

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,5 @@
import customtkinter as Ctk
from PIL import Image
from icons.icons import Icons
import scripts.get_sys_info as system_code
from scripts.ClosePopup import ClosePopup
@ -18,16 +18,17 @@ SELECTION_TEXT = "Select your Directory and your Export Directory"
class App(Ctk.CTk):
def __init__(self):
super().__init__()
self.icons = Icons()
system_code.load_json_file()
system_code.set_theme()
self.my_font = Ctk.CTkFont(family="Berlin Sans FB", size=22)
self.font_entry = Ctk.CTkFont(family="Berlin Sans FB", size=18)
self.minsize(1000, 750)
self.geometry(f"{system_code.window_width}x{system_code.window_height}")
icon_path = "./icons/Program_Icon.ico"
icon_path = self.icons.get_icon_path()
self.iconbitmap(icon_path)
self.after(1, self.wm_state, system_code.window_state)
self.back_btn_image = Image.open(r"./icons/back.png")
self.back_btn_image = self.icons.get_image("BackButton")
self.title("MPENN")
self.protocol('WM_DELETE_WINDOW', self.close_attempt)
self.settings_frame = Settings(master=self)
@ -277,6 +278,5 @@ class App(Ctk.CTk):
relheight=0.095
)
if __name__ == '__main__':
app = App()
app.mainloop()