Re: Bottom - Source/Accessory ToolBar question
Thanks both of you! -Luther On Mon, Oct 13, 2014 at 7:21 PM, Ken Thomases wrote: > On Oct 13, 2014, at 6:54 PM, Luther Baker wrote: > > > A few years back, many Mac apps had a similar looking bottom bar on the > > left hand side of the app. Specifically, apps that had a "Source" style > > outline view on the left hand side had this silverish gradient styled > > bottom bar that often consisted of "plus" and "minus" buttons on the left > > and a gripper control on the right. > > > Is there a simple way to create this? It looks like a simple view with a > > simple gradient --- but it does have gripper functionality. > > Since the buttons that go in such a button bar are usually gradient > buttons, I have used an NSButtonCell configured as a gradient button to do > the drawing of the background. That way it will definitely match the style > of the buttons. > > Apple is deprecating the use of NSCell and its subclasses. You could use > an actual NSButton (or make your view class a subclass of NSButton) and > make it non-interactive. > > Drawing the actual grip lines is done manually or with an image. As > Graham noted, the grip functionality is a built-in feature of NSSplitView, > provided you implement the relevant delegate method. > > Regards, > Ken > > ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Bottom - Source/Accessory ToolBar question
On Oct 13, 2014, at 6:54 PM, Luther Baker wrote: > A few years back, many Mac apps had a similar looking bottom bar on the > left hand side of the app. Specifically, apps that had a "Source" style > outline view on the left hand side had this silverish gradient styled > bottom bar that often consisted of "plus" and "minus" buttons on the left > and a gripper control on the right. > Is there a simple way to create this? It looks like a simple view with a > simple gradient --- but it does have gripper functionality. Since the buttons that go in such a button bar are usually gradient buttons, I have used an NSButtonCell configured as a gradient button to do the drawing of the background. That way it will definitely match the style of the buttons. Apple is deprecating the use of NSCell and its subclasses. You could use an actual NSButton (or make your view class a subclass of NSButton) and make it non-interactive. Drawing the actual grip lines is done manually or with an image. As Graham noted, the grip functionality is a built-in feature of NSSplitView, provided you implement the relevant delegate method. Regards, Ken ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Bottom - Source/Accessory ToolBar question
Pretty sure you have to make it yourself. Making it act as a "gripper" for the split pane is easy enough, that class has a way to nominate an additional region for dragging the split bar via its delegate: -[NSSplitViewDelegate splitView:additionalEffectiveRectOfDividerAtIndex:] The gradient you have to create yourself, though NSGradient maks this easy. Unfortunately there isn't a built-in way to get that that will match the current OS appearance automatically, so if you want it to look flat on Yosemite you have to detect the OS version in your own drawing code. Otherwise it's a really simple view class, and the buttons are just added as subviews on top. --Graham On 14 Oct 2014, at 10:54 am, Luther Baker wrote: > A few years back, many Mac apps had a similar looking bottom bar on the > left hand side of the app. Specifically, apps that had a "Source" style > outline view on the left hand side had this silverish gradient styled > bottom bar that often consisted of "plus" and "minus" buttons on the left > and a gripper control on the right. > > Stunt Software's "On the Job" has this http://stuntsoftware.com/onthejob/ > ... Omni's OmniFocus had this - > http://www.macworld.com/article/1132832/omnifocus1.html ... as does The Hit > List - http://www.karelia.com/products/the-hit-list/mac.html ... > > Is there a simple way to create this? It looks like a simple view with a > simple gradient --- but it does have gripper functionality. I just want to > make sure I'm not missing something that every other desktop developer > knows about. I think it is an older technique and might not be encouraged > much by the HIG anymore (Omni has moved away from that style - > http://www.omnigroup.com/omnifocus ) I almost want to know how, just > for posterity as much as anything else. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Bottom - Source/Accessory ToolBar question
A few years back, many Mac apps had a similar looking bottom bar on the left hand side of the app. Specifically, apps that had a "Source" style outline view on the left hand side had this silverish gradient styled bottom bar that often consisted of "plus" and "minus" buttons on the left and a gripper control on the right. Stunt Software's "On the Job" has this http://stuntsoftware.com/onthejob/ ... Omni's OmniFocus had this - http://www.macworld.com/article/1132832/omnifocus1.html ... as does The Hit List - http://www.karelia.com/products/the-hit-list/mac.html ... Is there a simple way to create this? It looks like a simple view with a simple gradient --- but it does have gripper functionality. I just want to make sure I'm not missing something that every other desktop developer knows about. I think it is an older technique and might not be encouraged much by the HIG anymore (Omni has moved away from that style - http://www.omnigroup.com/omnifocus ) I almost want to know how, just for posterity as much as anything else. Thanks, -Luther ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com