Re: NSTableRowView appearance when group rows float - SOLVED
Re: NSTableRowView appearance when group rows float - SOLVED
- Subject: Re: NSTableRowView appearance when group rows float - SOLVED
- From: Bill Cheeseman <email@hidden>
- Date: Sun, 17 Aug 2014 10:31:09 -0400
On Aug 16, 2014, at 1:50 PM, Bill Cheeseman <email@hidden> wrote:
> I have now solved the problem of the first group row appearing in regular (non-bold) typeface at launch and only changing to boldface when the source list is first manually scrolled.
It actually took one final, definitive step: overriding -[NSTableRowView drawRect:] to set the font of group source list rows to Bold System Font. I got the idea from a mailing list post a couple of years ago by Mr. Corbin, who I understand wrote the view-based NSTableView frameworks. Here's my -drawRect: override:
- (void)drawRect:(NSRect)dirtyRect {
// work around an AppKit bug where floating group source list rows sometimes draw in regular (non-bold) font instead of required bold font.
[super drawRect:dirtyRect];
NSTextField *textField = [[self viewAtColumn:0] textField];
NSFont *font = [textField font];
[textField setFont:[NSFont boldSystemFontOfSize:[font pointSize]]];
}
--
Bill Cheeseman - email@hidden
_______________________________________________
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