Re: Fonts in TableView
Re: Fonts in TableView
- Subject: Re: Fonts in TableView
- From: "Gerriet M. Denkmann" <email@hidden>
- Date: Sun, 06 Nov 2016 16:11:56 +0700
> On 6 Nov 2016, at 13:18, Quincey Morris <email@hidden> wrote:
>
> On Nov 5, 2016, at 21:44 , Gerriet M. Denkmann <email@hidden> wrote:
>>
>> NSRect boundingRect = tableFont.boundingRectForFont;
>> self.outlineView.rowHeight = ceil( boundingRect.size.height )
>
> This is probably a poor choice, for reasons that probably will seem illogical:
This seems to work:
NSTextField *dummyTextField = [ [NSTextField alloc] initWithFrame: NSMakeRect(0,0,99,99) ];
dummyTextField.font = tableFont;
NSSize contentSize = dummyTextField.intrinsicContentSize;
tableRowHeight = contentSize.height;
Some problem with Marion (and others): The disclosure triangle in OutlineView points not to the centre of the line, but well below the baseline.
And: Palatino can be compressed (by making the TableColumn smaller; NSLineBreakByTruncatingTail) up to a truly ridiculous level (like 0.15; normal fonts compress down to about 0.9; values guessed, not measured).
Good enough for now.
Thanks very much for your help!
Kind regards,
Gerriet.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden