[OpenJDK 2D-Dev] RFR: 8182043: Access to Windows Large Icons [v15]

Sergey Bylokhov serb at openjdk.java.net
Thu May 27 16:19:16 UTC 2021


On Wed, 26 May 2021 21:39:19 GMT, Alexander Zuev <kizune at openjdk.org> wrote:

>> test/jdk/javax/swing/JFileChooser/FileSystemView/SystemIconTest.java line 87:
>> 
>>> 85:             }
>>> 86: 
>>> 87:             if (implComplete && icon.getIconWidth() != size) {
>> 
>> Why the size of the returned images might be different? The spec state the size parameter in the getSystemIcon is the size of the icon in the userspace.
>
> The spec says that we are taking into consideration requested sizes but depending on the platform implementation exact match can not be guaranteed. On Windows it can so i'm checking for that.

Is this requirement is so important? can we return an MRI(same as on Windows) which will have just one resolution? Otherwise what the user should do if the requested size was 32x32 but returned image will be 21x21? Paint the small icon or rescale it by the application?

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

PR: https://git.openjdk.java.net/jdk/pull/2875


More information about the 2d-dev mailing list