Tuesday, 15 June 2010

osx - Gap is showing in my NSMenuItem custom view in Mac OS X 10.10 -



osx - Gap is showing in my NSMenuItem custom view in Mac OS X 10.10 -

i looking @ post: gap above nsmenuitem custom view , seems not working in mac os x 10.10.

i have custom menuitem , menuitemview classes , prior 10.10, working fine. now, can see gray-colored gap @ top , bottom of menuitem view. seen in mac os x 10.10. yosemite issue or need handle this?

any help much appreciated. thanks.

if aren't targeting mac app store, here's workaround using private api turning top padding off.

first, declare next category on nsmenu (otherwise you'll lots of arc unknown-selector-errors):

@interface nsmenu (private) // utilize nsmaxyedge toggle top padding // , nsminyedge toggle bottom 1 - (void)_sethaspadding: (bool)enabled onedge: (nsrectedge) edge; @end

then utilize follows:

[self.menu _sethaspadding: no onedge: nsmaxyedge];

osx menuitem

No comments:

Post a Comment