Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to customize NSMenu like the Apple Pro Apps?

I want to customize a NSMenu with NSMenuItems, so does it looks like the Apple Pro Apps.

But how can I customize a NSMenu? There is no draw method to change the appearance. If I set a NSView to a NSMenuItem, I can set the background color, but I will loose highlighting and menu handling. Furthermore the top and bottom cap of the NSMenu cannot be customized.

I found only this hint, but unfortunately without code.

Dark TableView with a white menu and white menu items

I would be very happy for some help!

like image 985
Matt Avatar asked Mar 30 '10 15:03

Matt


1 Answers

The hard answer is, make your own, subclass NSMenu, NSMenuItem etc and manually handle the drawing, animations etc.

like image 160
valexa Avatar answered Sep 27 '22 21:09

valexa