RFR: 8377426: Adjust scene background to color scheme [v2]

Michael Strauß mstrauss at openjdk.org
Thu Feb 12 17:09:03 UTC 2026


On Thu, 12 Feb 2026 16:45:12 GMT, Andy Goryachev <angorya at openjdk.org> wrote:

> The last change brings, in my opinion, an unreasonable amount of fairly complicated code for something that can only be observed momentarily. Overkill?

Depends on your aesthetic sensitivities, I guess. It's true that it is a fair bit of code to solve this, but on the other hand, that brief flash does look a bit unpolished and cheap. And depending on the styling of the application, it's almost impossible to work around it. Personally, I often find that that last bit of polish separates a good application from a great one.

> The main issue, if I understand it correctly, is that the background flashes with a wrong color for the given color scheme, i.e. white in the dark mode. Could we fix just that? I think it might be ok to flash black/white for dark/light mode correspondingly. Or use the panel background color from the theme, if it is available at this point?

Setting the background color to white or dark works for applications whose backgrounds are close to white or black. The flash gets noticeably worse the more the application background deviates from white or black, and especially so if colors are involved.

-------------

PR Comment: https://git.openjdk.org/jfx/pull/2068#issuecomment-3892180661


More information about the openjfx-dev mailing list