« | Home | »

SourceListView

UPDATE: I have released an updated version of this sample that takes advantage of improvements Apple made in Leopard (Mac OS X 10.5).

Download SourceListView

I’ve been looking for a SourceList outline view for FaceSpan that I can use under Mac OS X 10.4. A bunch of Googling revealed parts of the puzzle, but nothing that pulled all the pieces together. So I decided to produce my own SourceList view using the pieces I found.

I used iPhoto ’08, iTunes 7, Numbers ’08 and Mail as models. Here are the elements of the SourceList views in these applications that seem to be different from the stock NSTableView/NSOutlineView:

  1. Light blue background color
  2. Darker blue or blue gradient selection background
  3. The selection background color does not honor the system’s selection color preference
  4. Source Groups are not selectable
  5. Source Groups are drawn All Caps, Bold, Gray with a white shadow (appear embossed into the background)
  6. Source Group rows are a little taller than the others
  7. When inactive, the selection background turns gray, and the text switches from white to black
  8. The disclosure triangles are smaller than the ones provided by NSOutlineView (I’ve still not figured out how to accomplish this).

Here’s what I came up with:

Gradient Selection background (thank’s to Matt Gemmell’s iTableView):

itunessourcelist.jpg

Flat Selection background:

numberssourcelist.jpg

Matt Gemmell’s license seems reasonable, so I’m releasing the SourceList code under his license.


About this entry