Merge pull request 'fixed Bug with Icon' (#27) from BugFixing into main
Reviewed-on: Fabelous/mpenn#27
This commit is contained in:
commit
27c009f758
|
@ -1,12 +1,16 @@
|
||||||
import customtkinter as Ctk
|
import customtkinter as Ctk
|
||||||
|
from icons.icons import Icons
|
||||||
|
|
||||||
class ClosePopup(Ctk.CTkToplevel):
|
class ClosePopup(Ctk.CTkToplevel):
|
||||||
def __init__(self,master, callback, **kwargs, ):
|
def __init__(self,master, callback, **kwargs, ):
|
||||||
super().__init__(master, **kwargs)
|
super().__init__(master, **kwargs)
|
||||||
|
self.icons = Icons()
|
||||||
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()
|
||||||
|
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
|
||||||
|
|
Loading…
Reference in New Issue