Re: Making textured windows pretty
Re: Making textured windows pretty
- Subject: Re: Making textured windows pretty
- From: j o a r <email@hidden>
- Date: Mon, 11 Aug 2003 16:27:51 +0200
Hej,
On den 11 augusti 2003, at 15:50:45PM, Fabian Lidman wrote:
NSTableViews and NSTextViews have a pretty weak-looking gray frame
around them. We want to emphasise this line by drawing a small bevel
around these controls, but for various reasons we cannot subclass the
actual views to do this. Is it possible to make a subclass of NSView
and replace the root-level view of the window to do this?
In that case the simplest thing is probably to make the table view
(with scrollbars and everything) into a subview of some view that knows
how to draw a bevel. Make this view a couple of pixels wider and higher
than the table view on all edges. That should be fairly simple.
We also want the bottom of the window to be rectangular rather than
rounded, like in Safari. Does anyone know how Apple did this?
This is not public in the current API, but if you're not afraid to walk
the wild side you can add this somewhere at the top of your window
controller:
@protocol DummyProtocol
- (void) setBottomCornerRounded:(BOOL) flag;
@end
And then before placing the window on screen:
if ([window respondsToSelector: @selector(setBottomCornerRounded:)])
{
// Private API
[(id < DummyProtocol >)window setBottomCornerRounded: NO];
}
j o a r
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.