Skip to content

Commit

Permalink
Move iconify to before setting alpha (israel-dryer#236)
Browse files Browse the repository at this point in the history
  • Loading branch information
laggykiller committed Feb 9, 2023
1 parent 7f79918 commit e625892
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions src/ttkbootstrap/window.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,16 +263,16 @@ def __init__(
width, height = resizable
self.resizable(width, height)

if alpha is not None:
if self.winsys == 'x11':
self.wait_visibility(self)
self.attributes("-alpha", alpha)

if transient is not None:
self.transient(transient)

if overrideredirect:
self.overrideredirect(1)

if alpha is not None:
if self.winsys == 'x11':
self.wait_visibility(self)
self.attributes("-alpha", alpha)

apply_class_bindings(self)
apply_all_bindings(self)
Expand Down Expand Up @@ -414,9 +414,6 @@ def __init__(

super().__init__(**kwargs)
self.winsys = self.tk.call('tk', 'windowingsystem')

if iconify:
self.iconify()

if iconphoto != '':
try:
Expand Down Expand Up @@ -450,6 +447,14 @@ def __init__(
width, height = resizable
self.resizable(width, height)

if alpha is not None:
if self.winsys == 'x11':
self.wait_visibility(self)
self.attributes("-alpha", alpha)

if iconify:
self.iconify()

if transient is not None:
self.transient(transient)

Expand All @@ -466,11 +471,6 @@ def __init__(
if toolwindow:
if self.winsys == 'win32':
self.attributes("-toolwindow", 1)

if alpha is not None:
if self.winsys == 'x11':
self.wait_visibility(self)
self.attributes("-alpha", alpha)

@property
def style(self):
Expand Down

0 comments on commit e625892

Please sign in to comment.