On Thu, 12 Feb 2026 11:39:33 GMT, Michael Strauß <[email protected]> wrote:

>> When a non-opaque scene fill color is used with a stage style other than 
>> `StageStyle.TRANSPARENT`, the actual fill color is always white. This 
>> doesn't work well when the scene uses a dark color scheme. A practical 
>> solution is to allow non-opaque scene fill colors, and blend them on top of 
>> a white or black background (depending on color scheme) to derive an opaque 
>> color that adapts intuitively to the color scheme.
>> 
>> To test this, simply create a scene that uses a non-opaque fill color and 
>> observe the scene background when the color scheme is changed.
>> 
>> This PR includes a system test, run it with:
>> 
>> ./gradlew -PFULL_TEST=true -PUSE_ROBOT=true :systemTests:test --tests 
>> test.robot.javafx.scene.SceneFillTest.testSceneFill
>
> Michael Strauß has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   Clear background to dominant fill color

Thank you for providing examples, that made my life easier.

I've updated 
https://github.com/andy-goryachev-oracle/Test/blob/main/src/goryachev/bugs/Stage_Background_8377426.java
 with your examples, below are the results:

**Master Branch**

Light Mode
0 flashes black
1 flashes red
2 flashes black
3 flashes red
4 flashes black
5 flashes black

Dark Mode
0 flashes black
1 flashes red
2 flashes black
3 flashes red
4 flashes black
5 flashes black


**PR #2068**

Light Mode
0 nf
1 nf
2 flashes black ??
3 flashes red
4 nf
5 nf

Dark Mode
0 nf
1 nf
2 nf
3 nf
4 nf
5 nf
6 flashes white?

nf - no flashing, or flashes too fast to figure out the color


Well, it does look better (if for a split second).  I still not sure if it's 
worth all the additional code, but at least it's java and not native.

Do you know why it has to flash in the first place?  Why can't it render the 
content and _then_ show it?

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

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

Reply via email to