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: Quincey Morris <email@hidden>
- Date: Mon, 2 Aug 2010 15:51:10 -0700
On Aug 2, 2010, at 15:31, Tony Romano wrote:
> Changing the argument to the correct flag gets me the button, however, setting the style doesn't have any effect. I moved the code to initWithContentRect: post the call to super, still no change. I introspected the view with F-Script and it has the bezel style I set but the window still draws the standard widget. Any other ideas?
Yes -- don't do that. :)
You're trying to take a shortcut by trying to get NSPanel to provide inspector behavior that it doesn't have. This is not a great idea, not least for the reason that it risks breaking when panels or the standard buttons are implemented differently.
How many of these inspectors do you have? Unless you have a *lot*, it probably isn't worth spending your time to do it this way -- leave the panel title bar alone and put your disclosure triangle at the top of the panel content view.
The behavior you're trying to imitate here (say, Photoshop's) is designed to deal with having lots and lots of inspectors, has a fairly complex implementation that doesn't entirely depend on standard NSWindow or NSPanel behavior (AFAIK), and goes hand in hand with lots of other sophistication, such as docking of palettes, draggable palette tabs, which are even more work that might not be appropriate for your app.
Why not do the "obvious" thing (if you haven't already), and "waste" the height of the NSPanel title bar (put the disclosure triangle in the panel content view), and see who complains about it -- and, far more importantly, *what* they complain about. Maybe your real problem will be that you have too many inspectors, not that the individual inspectors are too big vertically.
It seems to me that (unless you've gone through all of these factors already) you're indulging yourself in something similar to premature optimization.
_______________________________________________
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