Re: Showing numpad key equivs in menu items
Re: Showing numpad key equivs in menu items
- Subject: Re: Showing numpad key equivs in menu items
- From: Kyle Sluder <email@hidden>
- Date: Tue, 07 May 2013 19:28:50 -0700
On May 7, 2013, at 7:00 PM, Allan Odgaard <email@hidden> wrote:
> TextMate’s implementation is here https://github.com/textmate/textmate/blob/master/Frameworks/OakAppKit/src/NSMenuItem Additions.mm#L170-L189 and sets the title as an attributed string using an NSTextTableBlock to have the key equivalent string show as the second column. This is fairly unobtrusive and the only (user visible) shortcoming I have found is that it doesn’t left/right align the key/modifier glyphs and writes out F1-Fn instead of using the special glyphs for these keys.
Any reason you're not using a custom view-based NSMenuItem? It might be easier to get good results that way.
--Kyle Sluder
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden