Skip to content
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

[OSX] Icons in menu items are not displayed properly in Dark Mode #2773

Closed
mrfabbri opened this issue Dec 9, 2014 · 0 comments
Closed

[OSX] Icons in menu items are not displayed properly in Dark Mode #2773

mrfabbri opened this issue Dec 9, 2014 · 0 comments

Comments

@mrfabbri
Copy link
Member

mrfabbri commented Dec 9, 2014

When "Dark Mode" is selected ("Use dark menu bar and Dock" option in "General" Preference Settings) icons (in menu items) are rendered as dark on dark and hence are not quite visible.

Light mode
screen shot 2014-12-09 at 16 08 21

Dark mode
screen shot 2014-12-09 at 16 08 14

On OS X it should possible for MenuItem icons to take advantage of the isTemplate feature in NSImage to be styled according the current status of the view (enabled/disabled/dark menu/light menu, etc…).

mrfabbri added a commit to mrfabbri/node-webkit that referenced this issue Dec 9, 2014
Add boolean property (defaults to `true`) `iconsIsTemplate` to `MenuItem` objects
to allow for proper display of icons in Mac OS X (Yosemite) Dark Menus.

When `iconsIsTemplate` is set to true, the `icon` is treated as a "template" and
the system automatically ensures proper styling according to the various states
of the menu 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#2773
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant