Re: Rotate a standard Cocoa control?
Re: Rotate a standard Cocoa control?
- Subject: Re: Rotate a standard Cocoa control?
- From: Graham Cox <email@hidden>
- Date: Sun, 10 May 2015 13:41:47 +1000
> On 9 May 2015, at 3:22 pm, Jerry Krinock <email@hidden> wrote:
>
> Graham, from one who has been using your code since MacZoop, I say thank you AGAIN :)
>
> After using Apple’s NSSlider in circular style, I discovered other issues in addition to the two mentioned in my original post…
>
> - NSSlider has only one size.
>
> - NSSlider requires the eyesight and dexterity of a 14-year-old to use it.
>
> -- In order to turn NSSlider “up” or “down”, the user must make a circular motion on the mouse or trackpad. Yours works correctly: Drag up or down in a straight line. This is the way the circular controls in GarageBand work.
>
> Go Graham!
>
Hi Jerry, you’re welcome - nice to be able to make a contribution again :)
I’ve updated the source a little - adds NSCoding, NSCopying, finer control with option and temporary snap on tickmarks with shift, plus allows the control to be scaled to a different size better (scales various rects rather than using fixed insets). I’ve also overridden the NSControl methods to get and set the value as int, float, NSInteger and string as well as double so it’s easier to use in a normal control’s place (these all end up setting the doubleValue).
I know what you mean about the mouse dragging, it’s a pain when controls seem baulky because they expect some complicated motion. I think Howard’s suggestion of also interpreting horizontal distance would be a good improvement as well, but I haven’t implemented that yet.
http://apptree.net/code/GCVolumeControl.zip
—Graham
_______________________________________________
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