RFR: 8282526: Default icon is not painted properly [v4]
Alexey Ivanov
aivanov at openjdk.java.net
Thu Jun 9 10:54:25 UTC 2022
On Thu, 2 Jun 2022 17:24:10 GMT, Alexander Zuev <kizune at openjdk.org> wrote:
> > Do we need to update the size value and take into account the low/hi sizes?
>
> Not exactly, the issue is that for some files (but just for some of them) this call ignores the high icon size parameter and always returns the set of small and large icons as 16x16 plus 32x32. For the rest of the files it returns 16x16 and the requested size. If low size is not set it is assumed to be 16x16 so we can omit setting it.
I can't see anything about that in the documentation for [`IExtractIconW::Extract`](https://docs.microsoft.com/en-us/windows/win32/api/shlobj_core/nf-shlobj_core-iextracticonw-extract) which says:
`nIconSize` - The desired size of the icon, in pixels. The low word contains the size of the large icon, and the high word contains the size of the small icon.
For the return value, the documentation says, _“Returns S_OK if the function extracted the icon, or S_FALSE if the calling application should extract the icon.”_ We don't even check the return value.
-------------
PR: https://git.openjdk.java.net/jdk/pull/7805
More information about the client-libs-dev
mailing list