RFR: 8287912: GTK L&F : Background of tree icons are red
Prasanta Sadhukhan
psadhukhan at openjdk.org
Thu Sep 1 17:07:13 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 1:
> 1:
remove this empty line
test/jdk/javax/swing/JTree/TestTreeBackgroundColor.java line 81:
> 79: if (c.equals(Color.RED)) {
> 80: passed = true;
> 81: }
better to check at midpoint tree.width/2, tree.height/2 and also break if it's RED, no need to check all pixels.
-------------
PR: https://git.openjdk.org/jdk/pull/10112
More information about the client-libs-dev
mailing list