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: Allan Odgaard <email@hidden>
- Date: Thu, 09 May 2013 09:18:56 +0700
On May 8, 2013, at 23:17, "David M. Cotter" <email@hidden> wrote:
>> TextMate also draws a custom string as key equivalent ... the only (user visible) shortcoming I have found is that it doesn’t left/right align the key/modifier glyphs
> this was a requirement of ours, to have it actually be right aligned, that's why we needed a custom view
The string itself is right-aligned. The issue is with not aligning on the split between the modifier(s) and keys, e.g.:
Here the modifiers for the C-binding is not aligned correctly with those of the P-bindings.
A fix could be to enforce a minimum width for the character, but not sure if there are string/paragraph attributes which allow this.
Another solution I am considering is using an image in the attributed string — this should provide most of the advantages of not replacing the menu item (with a custom view) yet give complete control over rendering of the “activation string”.
>> ability to set key equiv by glyph or key code
> actually our need is to have the ability to have an arbitrary *string* appear as the "shortcut". we don't care about the actual key equivalent, since we already handle this internally (not using OS)
This API would also fail to align modifiers across strings.
_______________________________________________
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