Re: Font size in NSTableView
Christiaan Hofman <[email protected]>
| Newsgroups | gmane.comp.macosx.devel |
|---|---|
| Message-ID | <[email protected]> |
On Feb 17, 2010, at 16:43, Markus Hitter wrote: > > Am 17.02.2010 um 14:18 schrieb Christiaan Hofman: > >> So my most pressing questions are which is wrong about regular sized table views: HIG or IB (because they're obviously not in agreement)? And which row height should I use resp. which typesetting behavior should I use to calculate Cocoa view layout (I do need this in more general situations)? > > Can I ask a question back? Why do you care? NSTableView is expected to do it right on it's own. > Several reasons: 1. NSTableView does NOT do it right on it own, because NSTableView does not do anything, it USES the settings it has (-rowHeight is a property that can be set, it's not a derived property.) 2. As I tried to explain, what IB does is not consistent to what the HIG says, and also is not consistent to what it used to do in 2.x, so I don't trust that IB is doing it right. 3. I want to be able to change the font and row height, based on a user pref (compare Mail.app) > One way to find out what NSTableView considers to be correct would be to ask it. If you hooked up custom views, ask super instead of self. > See 1 above. And a view does not give me the RELEVANT information, there's no -[NSView typesettingBehavior] or something. Calculating a size for a text is sensitive to lots of settings, but can also be the same for different settings and a wide array of fonts and/or text, so reconstructing is far from trivial. Christiaan > > Markus > > - - - - - - - - - - - - - - - - - - - > Dipl. Ing. Markus Hitter > http://www.jump-ing.de/