This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
When using the Dark Metal Theme / Darcula Theme (with invert icons option set) the colors of the icons are "inverted". This is done via setting a ImageFilter to the UIManager.put("nb.imageicon.filter", new DarkIconFilter()). See o.n.swing.laf.dark\src\org\netbeans\swing\laf\dark\DarkIconFilter.java ACTUAL: Only some icons are inverted. Inverting is done in org.openide.util.ImageUtilities.loadImageIcon(String, boolean) But not in org.openide.util.ImageUtilities.loadImage(...) EXPECTED: All icons are inverted.
Created attachment 160376 [details] Patch
Created attachment 160377 [details] Patch in action
I like to provide a patch for that. I have committer rights, but I am not sure about the removal of assert (tracker.statusID(id, false) == MediaTracker.COMPLETE) : "Image loaded"; from the code. So I need a review of this patch, before it gets committed. You can see the before-after-comparison-screenshot at https://netbeans.org/bugzilla/attachment.cgi?id=160377
Created attachment 160393 [details] Patch v2 (including support for branding) Here is a new version of the patch. * simplified code and added doc * supports brandings like about_nb_dark.png, but only about.png has been requested * duplicate images like splashscreen, about picture, logos for startpage as _dark-suffixed images (else the about picture and the startpage logos would get inverted too) * could not find a way to keep "assert (tracker.statusID(id, false) == MediaTracker.COMPLETE) : "Image loaded";" If there are no objections, I will integrate it on monday.
Created attachment 160394 [details] patch2-darcula-laf-withinvertedicons.png
Created attachment 160395 [details] patch2-darcula-laf.png
Created attachment 160396 [details] patch2-darkmetal-laf.png
Created attachment 160397 [details] patch2-darknimbus-laf.png
Created attachment 160398 [details] patch2-windows-laf.png
Note: Need to inform Jirka, that about_nb_dark.png (...) has to be provided, when 8.2 is on release branch.
*** Bug 235119 has been marked as a duplicate of this bug. ***
fixed http://hg.netbeans.org/core-main/rev/121baf524946 * ImageUtilities.loadImageIcon now supports filtering of images using a dark LaF too -> every image loaded by the platform is handled ** if it's a darktheme, then *** if there exists an image with the postfix "_dark" that image is returned unaltered/unfiltered. For example about.png -> about_dark.png/about_dark_BRANDING.png *** otherwise load the original image and apply the filter is defined by the LookAndFeel via the filterUIManager.get( "nb.imageicon.filter") * Duplicate logos for oracle/java/nb in welcome and ide.branding module to look the same as without the patch * Remove special configuration for dark images from DarkMetal/DarkNimbus-Theme (is now handled by the "_dark"-image serves first approach) (had to update the spec version, else the changes won't apply)
Integrated into 'main-silver', will be available in build *201607220002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/121baf524946 User: Benno Markiewicz <markiewb@netbeans.org> Log: #262804 - [dark] Invert icon consistently - ImageUtilities.loadImageIcon supports dark LaFs * ImageUtilities.loadImageIcon now supports filtering of images using a dark LaF too -> every image loaded by the platform is handled ** if its a darktheme, then *** if there exists an image with the postfix "_dark" that image is returned unaltered/unfiltered. For example about.png -> about_dark.png/about_dark_BRANDING.png *** otherwise load the original image and apply the filter is defined by the LookAndFeel via the filterUIManager.get( "nb.imageicon.filter") * Duplicate logos for oracle/java/nb in welcome and ide.branding module to look the same as without the patch * Remove special configuration for dark images from DarkMetal/DarkNimbus-Theme (is now handled by the "_dark"-image serves first approach) (had to update the spec version, else the changes won't apply)