Rows upon Rows
October 24th, 2005
What is wrong with the below image?

From left to right:
- iChat
- OmniWeb 5
- NetNewsWire (main and Downloads windows)
- iTunes
Numbers 1 and 4 use the alternate row color specified by the Graphite appearance theme. Given that Cocoalicious and Delicious Library also do this, I’m guessing there is some documented way to make applications automatically adopt the active theme’s alternate row color. If this is so, I wonder why it isn’t the default behavior.


If you use the standard NSTableView in Cocoa, you get that for free. The problem can come when you roll your own table view, which many people used to do because Apple didn’t provide the alternating rows feature until (I think) Panther. OmniWeb and NNW are probably using their own custom table view implementations to maintain Jaguar compatibility, but not taking that into account. There *is* however, a way they could: there are system APIs for figuring out the theme colors.
Thanks for the explanation, Buzz. I suspected it was something having to do with custom tables.
Here’s the color call in Cocoa:
[[NSColor colorWithCatalogName:@"System" colorName:@"controlAlternatingRowColor"] colorUsingColorSpaceName:NSCalibratedRGBColorSpace]
Also subscribe to the @”AppleAquaColorVariantChanged” notification.
Also note this color is available all the way back to 10.2 as well.