Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move iconify to before setting alpha (#236) #428

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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