New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Icon is not visible on OS X Yosemite dark menu bar #2476
Comments
You could also use this package to detect conditionally if dark mode is enabled -- https://github.com/sindresorhus/node-dark-mode |
That would allow us to detect the mode on application start, but it doesn't look like there is an event for detecting changes during runtime. |
An ugly hack would be to use |
There's a couple of issues I describe here with node-dark-mode preventing this from working.
|
I think the cleanest solution would be to have an /cc @rogerwang what's your take on this? |
Add boolean property (defaults to `true`) `iconsAreTemplates` to `Tray` objects to allow for proper display of icons in Mac OS X (Yosemite) Dark Menus. When `iconsAreTemplates` is set to true, both `icon` and `altIcon` are treated as "templates" and the system automatically ensures proper styling according to the various states of the status item (e.g. dark menu, light menu, etc.). Template images should consist only of black and clear colours and can use the alpha channel in the image to adjust the opacity of black content. See [Dark Menus in AppKit Release Notes for OS X v10.10](https://developer.apple.com/library/mac/releasenotes/AppKit/RN-AppKit/#10_10DarkMenus) and [`NSImage setTemplate:`](https://developer.apple.com/library/mac/documentation/Cocoa/Reference/ApplicationKit/Classes/NSImage_Class/index.html#//apple_ref/occ/instm/NSImage/setTemplate:). On Linux and Windows setting the property has no effect. FIX nwjs#2476
Why not use a multi-color icon so that no matter what the styling it is visible? |
@mikejramsey56 you will end-up with a sub-optimal result on both backgrounds; using a Template image is the recommended way (by OS X Human Interface Guidelines) to achieve a proper look in both light and dark appearance, (as a plus Template icons allow for proper rendering of other menu item statuses like disabled, selected...). The great majority of apps on OS X use template icons (e.g. Dropbox changed from it's iconic blue icon to a dark, on light, one). |
I agree with @mrfabbri, white icon on black black bar and/or black icon on white black bar. |
Steps to reproduce:
System Preferences
>General
Expected Result:
The icon is displayed and matches the theme in grayscale. (inverted to white)
Actual Result:
The icon is not visible.
From what I've read, it looks like the image needs to be a template image.
I recommend a flag is added to the Tray object that enables this functionality.
The text was updated successfully, but these errors were encountered: