RFR: 8287912: GTK L&F : Background of tree icons are red

Jayathirth D V jdv at openjdk.org
Fri Sep 2 06:15:51 UTC 2022


On Thu, 1 Sep 2022 06:27:17 GMT, Abhishek Kumar <duke at openjdk.org> wrote:

> The background of tree icons are not red in GTK LAF when setOpaque is set to false for tree component.
> It has been observed that while painting tree cell background in GTK LAF, a rectangular area is also painted with background color (white). 
> 
> Proposed solution is to check the opacity of tree component before drawing tree cell background. If the opacity is set to "false" then the background shouldn't be painted.
> 
> An automated test case has been added and checked in CI, link is added in JBS.

test/jdk/javax/swing/JTree/TestTreeBackgroundColor.java line 84:

> 82:                 }
> 83:             }
> 84:             if (!passed) {

This test will pass even in the case of last pixel check is RED. We should check for pixel data and whenever it is not RED we should bail out.

Also if test fails it will leave TreeBackgroundColorTestFail.png, we should use temporary file and delete it on exit.

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

PR: https://git.openjdk.org/jdk/pull/10112



More information about the client-libs-dev mailing list