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

Dark theme: Flickering when opening frames and dialogs #339

Closed
mf-arb opened this issue Jun 9, 2021 · 3 comments
Closed

Dark theme: Flickering when opening frames and dialogs #339

mf-arb opened this issue Jun 9, 2021 · 3 comments
Milestone

Comments

@mf-arb
Copy link

mf-arb commented Jun 9, 2021

When opening frames and dialogs in dark mode, the dialog briefly flashes white before being drawn in dark gray. This short bright flickering is very annoying and does not always appear. The problem also occurs in the demo application when opening the 'Options/Show UI defaults inspector' dialog (not always but sometimes).

@LG987234122
Copy link

I see this same effect also. It's more noticeable when running under Webswing.

@DevCharly
Copy link
Collaborator

I've seen this too, sometimes, but don't think that I can do something here (in Java code). The background color of the java.awt.Window is already dark. Not sure whether Swing or Windows 10 fills the window with a light color. Have to dig into Swing/AWT C++ code...

If the FlatLaf native library is used, there is maybe a possibility to improve this. Will try...

Regarding Webswing: don't think that something can be done in FlatLaf here. But maybe you can use some CSS to change the background color of the Webswing browser window. Please contact Webswing developers.

DevCharly added a commit that referenced this issue Jul 31, 2021
…the bottom, then first fill the new space with the window background color (instead of black) before the layout is updated (issue #339)
DevCharly added a commit that referenced this issue Jul 31, 2021
…round with window background color (instead of white), which avoids flickering in dark themes (issue #339)
@DevCharly
Copy link
Collaborator

Fixed in main branch for Windows 10 when using FlatLaf native library (the default)

This was easy to reproduce when the screen content is dark and opening a large dark window.
Then the new window was white for a short moment before its actual content was shown.

@mf-arb on what operating system did you see this?

CC @ingokegel

@DevCharly DevCharly added this to the 1.5 milestone Jul 31, 2021
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

3 participants