Re: NSPanel, changing the look of the min button
Re: NSPanel, changing the look of the min button
- Subject: Re: NSPanel, changing the look of the min button
- From: Tony Romano <email@hidden>
- Date: Mon, 2 Aug 2010 17:15:53 -0700
Ok, seems like there is no middle ground between using straight cocoa and a custom titlebar.
Not sure if I can picture a solution using a NSOutlineView, seems orthogonal to what I am trying to achieve. If you go to Omni website and install the trial version of OmniGraphSketch and look at their inspectors, that will give you what I am trying to achieve(yeah, their code is Open Sourced and I am free to use it). The disclosure triangle hides/shows the panel. When hidden, you get just the title bar and the tool button bar showing.
Maybe the disclosure triangle in the custom view won't be so bad. I need to try that. It avoids the proximity issue with the standard button.
Sorry on the confusion with Precedence/Precedents. I need slow down.
Again, super thanks for the feedback.
-Tony
On Aug 2, 2010, at 4:43 PM, Quincey Morris wrote:
> On Aug 2, 2010, at 16:16, Tony Romano wrote:
>
>> Honestly guys, I have no devious motives here ! :-) I am not trying to take any shortcuts, I am just trying to learn the correct way to do things. There are programs such as Photoshop, OmniGraphSketcher that do similar things. For this UI, I am trying to follow precedence. I know the Omni code is completely custom drawn. I know Photoshop doesn't use cocoa as of CS4 so it must be custom as well.
>
> Oh, I just got it. You've been saying "precedence" and I just realized you meant "precedents". (I thought you meant something like behavior inheritance.)
>
> Before you use Photoshop or OmniGraphSketcher or anything else that has a similar palette system as a precedent, you need to be sure that you're trying to solve the same problem that those systems were designed to solve. That's what I was trying to direct your attention towards.
>
>> Right now I have 4 inspectors, it may go to 5 but thats about it. I can easily put the disclosure triangle on the content view and be done with it. Unfortunately, I still don't understand what I need to do to make my original proposal work short of creating my own "Inspector Panel" class. Is it possible using NSPanel as it stands or do I need to do a bunch of custom code.
>
> The reason I ... er ... accused you of using a shortcut is that your proposed solution isn't really repurposing the minimize button (and, it could be strongly argued, shouldn't repurpose it). The shortcut comes from not paying to attention to the *accidental* geographic similarity between the minimize button and the control you had in mind.
>
> If you chose to implement this with custom code, then you'd have to deal with only the following:
>
> 1. Suppressing the NSPanel title bar (possibly not hard).
>
> 2. Handling dragging of a window with no title bar (not hard).
>
> 3. Drawing an alternate gradient to look like a title bar (not hard).
>
> 4. Providing an alternate close control implementation (not hard, and quite possibly shouldn't be the traffic-light-style red button anyway)
>
> 5. Providing your disclosure control (not hard).
>
> 6. Resizing the window when the disclosure control action is triggered (not hard).
>
> Well, that's all I can think of. If you really wanted to have this behavior, it doesn't seem hard to implement in a way that is only a few lines of code and doesn't abuse the frameworks. In fact, I'd start by looking into using NSOutlineView to get the collapsing appearance and behavior for almost free.
>
> But, really, be sure you know what problem you're trying to solve before putting a lot of effort into solving it. :)
>
>
> _______________________________________________
>
> 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
>
-Tony
_______________________________________________
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