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:
commit
44002a5192
8
main.py
8
main.py
|
@ -1,4 +1,5 @@
|
||||||
import customtkinter as Ctk
|
import customtkinter as Ctk
|
||||||
|
import platform
|
||||||
from icons.icons import Icons
|
from icons.icons import Icons
|
||||||
|
|
||||||
import scripts.get_sys_info as system_code
|
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.font_entry = Ctk.CTkFont(family="Berlin Sans FB", size=18)
|
||||||
self.minsize(1000, 750)
|
self.minsize(1000, 750)
|
||||||
self.geometry(f"{system_code.window_width}x{system_code.window_height}")
|
self.geometry(f"{system_code.window_width}x{system_code.window_height}")
|
||||||
icon_path = self.icons.get_icon_path()
|
if platform.system() == "Windows":
|
||||||
self.iconbitmap(icon_path)
|
icon_path = self.icons.get_icon_path()
|
||||||
self.after(1, self.wm_state, system_code.window_state)
|
self.iconbitmap(icon_path)
|
||||||
|
self.after(1, self.wm_state, system_code.window_state)
|
||||||
self.back_btn_image = self.icons.get_image("BackButton")
|
self.back_btn_image = self.icons.get_image("BackButton")
|
||||||
self.title("MPENN")
|
self.title("MPENN")
|
||||||
self.protocol('WM_DELETE_WINDOW', self.close_attempt)
|
self.protocol('WM_DELETE_WINDOW', self.close_attempt)
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import customtkinter as Ctk
|
import customtkinter as Ctk
|
||||||
import scripts.get_sys_info as system_code
|
import scripts.get_sys_info as system_code
|
||||||
|
import platform
|
||||||
from icons.icons import Icons
|
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.my_font = Ctk.CTkFont(family="Berlin Sans FB", size=22)
|
||||||
self.geometry("400x300")
|
self.geometry("400x300")
|
||||||
self.resizable(False, False)
|
self.resizable(False, False)
|
||||||
icon_path = self.icons.get_icon_path()
|
if platform.system() == "Windows":
|
||||||
self.iconbitmap(icon_path)
|
icon_path = self.icons.get_icon_path()
|
||||||
self.after(201, lambda: self.iconbitmap(icon_path))
|
self.iconbitmap(icon_path)
|
||||||
|
self.after(201, lambda: self.iconbitmap(icon_path))
|
||||||
self.callback = callback
|
self.callback = callback
|
||||||
self.label = Ctk.CTkLabel(self, text="Do you want to leave?\n You might lose some Data", font=self.my_font)
|
self.label = Ctk.CTkLabel(self, text="Do you want to leave?\n You might lose some Data", font=self.my_font)
|
||||||
# Add exit button
|
# Add exit button
|
||||||
|
|
|
@ -156,7 +156,7 @@ def set_theme():
|
||||||
|
|
||||||
|
|
||||||
data_path = create_folder("MPENNconfigs")
|
data_path = create_folder("MPENNconfigs")
|
||||||
json_file_path = data_path + "./program.json"
|
json_file_path = data_path + "/program.json"
|
||||||
theme = Theme(path=data_path)
|
theme = Theme(path=data_path)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue