fixed resizable call for CTkToplevel shortly after toplevel creation

This commit is contained in:
TomSchimansky 2022-09-21 09:35:21 +02:00
parent ee85b27271
commit fb600c9811

View File

@ -164,9 +164,9 @@ class CTkToplevel(tkinter.Toplevel):
if sys.platform.startswith("win"): if sys.platform.startswith("win"):
if self.appearance_mode == 1: if self.appearance_mode == 1:
self.windows_set_titlebar_color("dark") self.after(10, lambda: self.windows_set_titlebar_color("dark"))
else: else:
self.windows_set_titlebar_color("light") self.after(10, lambda: self.windows_set_titlebar_color("light"))
def minsize(self, width=None, height=None): def minsize(self, width=None, height=None):
self.min_width = width self.min_width = width
@ -289,6 +289,7 @@ class CTkToplevel(tkinter.Toplevel):
elif self.iconify_called_after_windows_set_titlebar_color: elif self.iconify_called_after_windows_set_titlebar_color:
super().iconify() super().iconify()
else: else:
print("toplevel revert withdraw", self.state_before_windows_set_titlebar_color)
if self.state_before_windows_set_titlebar_color == "normal": if self.state_before_windows_set_titlebar_color == "normal":
self.deiconify() self.deiconify()
elif self.state_before_windows_set_titlebar_color == "iconic": elif self.state_before_windows_set_titlebar_color == "iconic":