On Tue, 11 May 2021 20:01:37 GMT, Alexey Ivanov <aiva...@openjdk.org> wrote:

>> Wherever it is necessary down the line we are wrapping the result in 
>> multi-resolution and if we wrap it here too we will have multi-resolution 
>> icon that contains multi-resolution images as a resolution variant. 
>> Unfortunately AWT can't handle painting of such abomination.
>
> No, it isn't wrapped: if `getShell32Icon` is called in `getIcon(final boolean 
> getLargeIcon)`, the returned value is immediately returned to the caller, see 
> lines 1157–1163 in the updated code:
> 
>                         if (hIcon <= 0) {
>                             if (isDirectory()) {
>                                 return getShell32Icon(FOLDER_ICON_ID, size);
>                             } else {
>                                 return getShell32Icon(FILE_ICON_ID, size);
>                             }
>                         }
> 
> It's not wrapped into multi-resolution icon when called from 
> `Win32ShellFolder2.get()` for keys `shell32Icon *` and `shell32LargeIcon *` 
> (lines 411/413–414).
> 
> Neither is the returned value of `Win32ShellFolder2.getSystemIcon` wrapped; 
> it's also called from `Win32ShellFolder2.get()` when getting icons for 
> `optionPaneIcon *` (lines 405/407). These icons are supposed to be large 
> 32×32 icons, thus if the size of the icon in `getSystemIcon(SystemIcon 
> iconType)` differs from 32, it should be wrapped. Otherwise, it could cause 
> regression for 
> [JDK-8151385](https://bugs.openjdk.java.net/browse/JDK-8151385): _[hidpi] 
> JOptionPane-Icons only partially visible when using Windows 10 L&F_.

I see - but still it has to be solved in the getShell32Icon method - which i'm 
going to do in a moment.

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

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

Reply via email to