RFR: 8258979: The image didn't show correctly with GTK LAF [v6]
Prasanta Sadhukhan
psadhukhan at openjdk.org
Fri Jan 12 03:12:22 UTC 2024
On Thu, 11 Jan 2024 15:21:46 GMT, Abhishek Kumar <abhiscxk at openjdk.org> wrote:
>> The collapsed icon for JTree is not painted using `Icon.paintIcon(Component c, Graphics g, int x, int y)` in GTK LAF. The collapsed icon is returned from BasicTreeUI class which doesn't contain any icon image whereas the expanded icon is returned from SynthTreeUI class and expanded icon is rendered correctly.
>> The proposed fix is to return collapsed icon as an object of collapsed icon wrapper which implements synthIcon and is similar to the expanded icon implementation.
>>
>> Test mentioned in JBS is an applet based which is converted to main based now and extended for all installed LAFs on the system.
>>
>> No regression caused with the fix, link is attached in JBS .
>
> Abhishek Kumar has updated the pull request incrementally with one additional commit since the last revision:
>
> Review comment update
Marked as reviewed by psadhukhan (Reviewer).
src/java.desktop/share/classes/javax/swing/plaf/synth/SynthTreeUI.java line 791:
> 789: //
> 790: // BasicTreeUI directly uses expandIcon outside of the Synth methods.
> 791: // To get the correct context we return an instance of this that fetches
We need to add collapsedIcon in the comment too now..
-------------
PR Review: https://git.openjdk.org/jdk/pull/17294#pullrequestreview-1816110275
PR Review Comment: https://git.openjdk.org/jdk/pull/17294#discussion_r1449180647
More information about the client-libs-dev
mailing list