< prev index next >

src/java.desktop/windows/classes/sun/awt/shell/Win32ShellFolderManager2.java

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.  Oracle designates this

@@ -124,13 +124,13 @@
             final int size = (int) Math.sqrt(iconBits.length);
             final BufferedImage img =
                     new BufferedImage(size, size, BufferedImage.TYPE_INT_ARGB);
             img.setRGB(0, 0, size, size, iconBits, 0, size);
 
-            STANDARD_VIEW_BUTTONS[iconIndex] = (size == 16)
+            STANDARD_VIEW_BUTTONS[iconIndex] = (size == SMALL_ICON_SIZE)
                     ? img
-                    : new MultiResolutionIconImage(16, img);
+                    : new MultiResolutionIconImage(SMALL_ICON_SIZE, img);
         }
 
         return STANDARD_VIEW_BUTTONS[iconIndex];
     }
 

@@ -377,11 +377,12 @@
         } else if (key.startsWith("shell32Icon ") || key.startsWith("shell32LargeIcon ")) {
             String name = key.substring(key.indexOf(" ") + 1);
             try {
                 int i = Integer.parseInt(name);
                 if (i >= 0) {
-                    return Win32ShellFolder2.getShell32Icon(i, key.startsWith("shell32LargeIcon "));
+                    return Win32ShellFolder2.getShell32Icon(i,
+                         key.startsWith("shell32LargeIcon ")?LARGE_ICON_SIZE : SMALL_ICON_SIZE);
                 }
             } catch (NumberFormatException ex) {
             }
         }
         return null;
< prev index next >