Hi, John. Welcome! That would be a useful patch. As you say, the challenge is to make sure it does not break the icon on other platforms.
Since calling setIconImages with more variants should normally be the right thing to do, removing the lower-resolution images should only be done on the specific platform where this is required. Instead of commenting out the lines, I would put them in an "if" statement, and only exclude them if the system is running on the KDE Plasma desktop. Perhaps you could also try another window manager (in particular, whichever one is used by Ubuntu, which is pretty popular), and see if that one requires the patch as well. If all the common Linux window managers require (or work with) the patch, then maybe the condition should be " Utilities.isUnix() && !Utilities.isMac()" (using org.openide.util.Utilities). But if it's only the KDE Plasma desktop, then it might be worth seeing if there is an way to detect this specific case. -- Eirik -----Original Message----- From: John Elliot V | ProgClub <[email protected]> Sent: Wednesday, January 8, 2020 10:09 PM To: [email protected] Subject: NetBeans icon patch Hi there. My name's John. I'm new. :) I just wanted to tender a patch for an issue I've been having with the NetBeans icon when displayed on my KDE Plasma desktop running under Ubuntu 18.04.3 LTS. The problem is that I have my Task Manager widget set at about 200px high. There's no problem when I have heaps of windows open, because in that case each application gets an icon on a 'row'; but when there's only one 'row' the application icons are huge, and when the application icons are huge the NetBeans icon looks terrible. I've taken some screen shots to illustrate the problem and my solution over here: https://www.jj5.net/file/2020-01-09-135528/netbeans-icon/ The patch that works well enough for me is to comment out low resolution images from the initFrameIcons() method in: platform/core.windows/src/org/netbeans/core/windows/view/ui/MainWindow.java as: static void initFrameIcons(Frame f) { List currentIcons = f.getIconImages(); if( !currentIcons.isEmpty() ) return; //do not override icons if they have been already provided elsewhere (JDev) f.setIconImages(Arrays.asList( // 2020-01-09 jj5 - OLD: removed low resolution icons... //ImageUtilities.loadImage(ICON_16, true), //ImageUtilities.loadImage(ICON_32, true), //ImageUtilities.loadImage(ICON_48, true), // 2020-01-09 jj5 - END ImageUtilities.loadImage(ICON_256, true), ImageUtilities.loadImage(ICON_512, true), ImageUtilities.loadImage(ICON_1024, true))); } It is conceivable this patch will create an issue in other environments (I'm not sure) but it worked okay for me on Ubuntu. Regards, John Elliot V -- |_|O|_| ProgClub |_|_|O| Because every programmer needs a good club! |O|O|O| https://www.progclub.org/
