Community Page
- toxicsoftware.com Jump to website »
-
Subscribe -
Community
-
Top Commenters
-
Popular Threads
-
Recent Comments
- thank you for the information..
- I'm interested in migrating an EE site to WordPress, but I'm not as tech savvy as you. Do you ever do freelance jobs?
- just found your page, do you if there is a "generic" bluetooth app to remote control the nxt with a mac book? your software works only with space navigator?
- Three things: www.bitbucket.org causes a certificate problem because of the "www" subdomain. Pure python keychain access:...
- Hi. So can you please provide the the code for that application? Would be really appreciated!
Jump to original thread »
I recently needed to embed the ‘Discrete’ variant of the NSLevelIndicatorCell into an NSTableView. The discrete cell looks like this:
Unfortunately adding the cell caused drawing of the table’s window to slow to crawl. The spinning beachball of death would ... Continue reading »
Unfortunately adding the cell caused drawing of the table’s window to slow to crawl. The spinning beachball of death would ... Continue reading »
3 years ago
3 years ago
Awesome treehouse(s) by the way.
3 years ago
3 years ago
I should make an exception for you though Chris… How about commercial - $1,000,000 per seat?
3 years ago
Try writing a subclass with this as its only implementation:
- (void)drawWithFrame:(NSRect)cellFrame inView:(NSView *)controlView {
[NSGraphicsContext saveGraphicsState];
NSRectClip(cellFrame);
[super drawWithFrame:cellFrame inView:controlView];
[NSGraphicsContext restoreGraphicsState];
}
The issue is with CG transparency layers (see CGContextBeginTransparencyLayer). They're a nice, clean way to a bunch of drawing, then put a shadow or a focus ring on the whole thing. Problem is, when you composite a transparency layer, it'll do calculations over the whole clip. It happens that when a cell is drawn in a tableview, the only clip is to the whole table.
That's, uh, bad.
3 years ago
I took out my code and replaced it with your simple clipping fix.
It certainly improved performance over the non-posed version but I think the caching version is still the fastest. Which is a shame, as your code is certainly cleaner and simpler.
You can compare all three versions here: http://toxic-public.googlecode.com//trunk/Misc/...