RFR: 8282526: Default icon is not painted properly [v4]

Sergey Bylokhov serb at openjdk.java.net
Fri Jun 3 21:48:37 UTC 2022


On Fri, 3 Jun 2022 05:13:25 GMT, Alexander Zuev <kizune at openjdk.org> wrote:

>>> I still do not see a reason why we cannot request the exact size of the image from the windows, so if the small icon and the screen scale is 1.25 we can try to extract 20x20
>> 
>> Because for some files - and we can not predict which files these are - function will always return set of 16x16 and 32x32 icons - no matter what we request. For the icons that return proper sizes we do request exact sizes and use them.
>
>> But can we use it as a backup if the system does not return the expected size on the initial/current call?
> 
> No, because in case when current implementation returns bad results this function also returns incorrect results so it is hardly a backup.

> Because for some files - and we can not predict which files these are - function will always return set of 16x16 and 32x32 icons - no matter what we request. For the icons that return proper sizes we do request exact sizes and use them.

How do we request the proper size for the example above when the scale is 1.25 and the "small" image? The requested size should be 20x20 but we will request 16x16 or 32x32 and then upscale/downscale, no?

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

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



More information about the client-libs-dev mailing list