UPDATE: I have released an updated version of this sample that takes advantage of improvements Apple made in Leopard (Mac OS X 10.5).
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:
- Light blue background color
- Darker blue or blue gradient selection background
- The selection background color does not honor the system’s selection color preference
- Source Groups are not selectable
- Source Groups are drawn All Caps, Bold, Gray with a white shadow (appear embossed into the background)
- Source Group rows are a little taller than the others
- When inactive, the selection background turns gray, and the text switches from white to black
- 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):
Flat Selection background:
Matt Gemmell’s license seems reasonable, so I’m releasing the SourceList code under his license.
About this entry
You’re currently reading “SourceListView,” an entry on Mark Alldritt's Journal
- Sep 08 2007 / 1:39 pm