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

Alexey Ivanov aivanov at openjdk.java.net
Thu Jun 9 10:39:43 UTC 2022


On Mon, 6 Jun 2022 22:53:11 GMT, Alexander Zuev <kizune at openjdk.org> wrote:

> Here, in the name of resolving this issue finally i have reverted the ImageIcon changes, instead i added some code that creates the properly scaled version of icon when requested variant is not available.

This looks good!

> I am not going trough all the experiments with the SHDefExtractIcon again - at least not in this pull request.

I absolutely agree, not in this pull request.

However, I'm for submitting a bug or two to explore other possibilities.

> I checked and there is no performance impact at all from the latest changes on the 100% scaled screens due to the extracting an additional icon - looks like Windows extracts it anyways even if we specify null as a icon information reference - it just does not pass it down.

It could be the case. The shell may keep and likely keeps a cache of file icons for small and large icons.

Windows used to have only two sizes of icons: `SM_CXSMICON` and `SM_CXICON` which have 16 and 32 values by default; the values were even customisable via Control Panel. Modern systems deal with more sizes.

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

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



More information about the client-libs-dev mailing list