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

Issue in focus #7

Closed
jaivardhan-bhola opened this issue Jun 13, 2022 · 6 comments
Closed

Issue in focus #7

jaivardhan-bhola opened this issue Jun 13, 2022 · 6 comments

Comments

@jaivardhan-bhola
Copy link

By clicking on the part where mica is used, the program minimizes. If the topmost attribute is applied, the window loses focus, and the mica effect is no longer visible.

@sumeshir26
Copy link

Thats a tkinter bug, nothing to do with win32mica

@marticliment
Copy link
Owner

marticliment commented Jun 13, 2022

Thats a tkinter bug, nothing to do with win32mica

Yes, this might be true, since on Qt win32mica behaves as expected

You can try setting a semi-transparent (but not visible) bg color (sth like rgba(255, 255, 255, 1%))

@rdbende
Copy link

rdbende commented Sep 29, 2022

Thats a tkinter bug, nothing to do with win32mica

It's not even a bug. It's a feature.

You can try setting a semi-transparent (but not visible) bg color (sth like rgba(255, 255, 255, 1%))

Well, Tkinter doesn't know such thing as "semi-transparent" 😕

@marticliment
Copy link
Owner

Thats a tkinter bug, nothing to do with win32mica

It's not even a bug. It's a feature.

You can try setting a semi-transparent (but not visible) bg color (sth like rgba(255, 255, 255, 1%))

Well, Tkinter doesn't know such thing as "semi-transparent" 😕

One thing you could do is creating with photoshop a white image and set it to 1% opacity, and then set it as the background on your tkinter app

@rdbende
Copy link

rdbende commented Sep 29, 2022

I believe you can't do that either. In Tkinter every widget has a background box, that can't have any transparency, so even if you have an image with alpha channel, it will blend with the background field.
I remember when making my themes for Tkinter I suffered for a long time before I realized that it's simply not possible.
You can make windows with alpha channel, but then everything, including the window decorations becomes semi-transparent.
Transparency is just an area, where Tcl/Tk simply sucks.

@marticliment
Copy link
Owner

Well, then the best thing I can say is to migrate to another UI toolkit.

I can personally recommend you Qt, because it provides lots of flexibility, performance with high quality.
I also reached a point where tkinter wasn't enough, and I decided to fully convert the project I was working on to Qt, and while it was a tedious process, I can guarantee that I have never regretted doing the change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants