Merge pull request 'Simple Bug Fixing and Simple Linux Support' (#32) from BugFixing into main

Reviewed-on: Fabelous/mpenn#32
This commit is contained in:
Falko Victor Habel 2024-05-05 19:14:07 +00:00
commit 44002a5192
3 changed files with 11 additions and 7 deletions

View File

@ -1,4 +1,5 @@
import customtkinter as Ctk
import platform
from icons.icons import Icons
import scripts.get_sys_info as system_code
@ -25,9 +26,10 @@ class App(Ctk.CTk):
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 = self.icons.get_icon_path()
self.iconbitmap(icon_path)
self.after(1, self.wm_state, system_code.window_state)
if platform.system() == "Windows":
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 = self.icons.get_image("BackButton")
self.title("MPENN")
self.protocol('WM_DELETE_WINDOW', self.close_attempt)

View File

@ -1,5 +1,6 @@
import customtkinter as Ctk
import scripts.get_sys_info as system_code
import platform
from icons.icons import Icons
@ -11,9 +12,10 @@ class ClosePopup(Ctk.CTkToplevel):
self.my_font = Ctk.CTkFont(family="Berlin Sans FB", size=22)
self.geometry("400x300")
self.resizable(False, False)
icon_path = self.icons.get_icon_path()
self.iconbitmap(icon_path)
self.after(201, lambda: self.iconbitmap(icon_path))
if platform.system() == "Windows":
icon_path = self.icons.get_icon_path()
self.iconbitmap(icon_path)
self.after(201, lambda: self.iconbitmap(icon_path))
self.callback = callback
self.label = Ctk.CTkLabel(self, text="Do you want to leave?\n You might lose some Data", font=self.my_font)
# Add exit button

View File

@ -156,7 +156,7 @@ def set_theme():
data_path = create_folder("MPENNconfigs")
json_file_path = data_path + "./program.json"
json_file_path = data_path + "/program.json"
theme = Theme(path=data_path)