RFR: 8258979: The image didn't show correctly with GTK LAF

Prasanta Sadhukhan psadhukhan at openjdk.org
Mon Jan 8 09:14:23 UTC 2024


On Mon, 8 Jan 2024 07:29:13 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 .

How about latest 23.10? Probably you should install and check there as well if you dont have that.....There is a need to check in latest OracleLinux too as there is a difference in observations across ubuntu versions..
Also, if one icon is rendered and other is not, there is a potential to create automated test to render the icons into bufferedimage and compare, the collapsed one should be all white BI in failed case...and you can use that automated test to test in ubuntu20.10 machine which we seem to have few in mach5...

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

PR Comment: https://git.openjdk.org/jdk/pull/17294#issuecomment-1880618805


More information about the client-libs-dev mailing list