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

Andy Goryachev angorya at openjdk.org
Thu Feb 12 19:02:19 UTC 2026


On Thu, 12 Feb 2026 11:39:33 GMT, Michael Strauß <mstrauss at openjdk.org> 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 clarifying.  I accept the aesthetic reasoning, though still feel the amount of code you've added specifically for the ~200 ms of startup might be just a bit too much.  Can it be useful in other places?

Would it be possible to alter https://github.com/andy-goryachev-oracle/Test/blob/main/src/goryachev/bugs/Stage_Background_8377426.java perhaps to allow for executing the different use cases?  To help with the review process?

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

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


More information about the openjfx-dev mailing list