You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2019/06/06 16:21:26 UTC

[GitHub] [netbeans] eirikbakke commented on a change in pull request #1273: [NETBEANS-2614, NETBEANS-1586] Improve icon scaling on HiDPI displays, and prepare ImageUtilities for HiDPI icons

eirikbakke commented on a change in pull request #1273: [NETBEANS-2614,NETBEANS-1586] Improve icon scaling on HiDPI displays, and prepare ImageUtilities for HiDPI icons
URL: https://github.com/apache/netbeans/pull/1273#discussion_r291265618
 
 

 ##########
 File path: java/jshell.support/src/org/netbeans/modules/jshell/editor/CommandCompletionProvider.java
 ##########
 @@ -337,7 +337,7 @@ protected ImageIcon getIcon() {
                             n = f.getLookup().lookup(Node.class);
                         }
                         if (n != null) {
-                            return (ImageIcon)ImageUtilities.image2Icon(n.getIcon(BeanInfo.ICON_COLOR_16x16));
+                            return new ImageIcon(n.getIcon(BeanInfo.ICON_COLOR_16x16));
 
 Review comment:
   It's a case where additional work, including a public API change in CompletionUtilities.renderHtml, would be required to change method signatures from ImageIcon to Icon.
   
   The change made here here is solely for the purpose of avoiding a ClassCastException. Once we actually start adding SVG icons we can go and migrate individual sites from ImageIcon to Icon, as necessary.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists