OK, thanks. I wasn't thinking of bold being affected by row size, but I guess it makes sense that it's going to reset the font entirely.
On Fri, Jun 10, 2016 at 10:46 AM, corbin dunn <corb...@apple.com> wrote: > > On Jun 10, 2016, at 7:58 AM, David Catmull <davidcatm...@gmail.com> wrote: > > I have a view-based, sidebar-style NSOutlineView. For some items, I want to > make the text bold. But if I change the rowSizeStyle to medium instead of > the default (in awakeFromNib), the text doesn't display as bold. If instead > I use a custom row size (in outlineView:heightOfRowByItem:) it works. What > gives? > > > Let’s take a look at the header :) > > typedef NS_ENUM(NSInteger, NSTableViewRowSizeStyle) { > /* The table will use the system default layout size: small, medium > or large. */ > NSTableViewRowSizeStyleDefault = -1, > > > /* The table will use the -rowHeight or ask the delegate for a > variable row height (if implemented) and cell layout is not changed. */ > NSTableViewRowSizeStyleCustom = 0, > > > /* The table will use a row height specified for a small/medium or > large table. > It is required that all sizes be fully tested and supported if > NSTableViewRowSizeStyleCustom is not used. > * Some standard Aqua metrics may be applied to cells based on the > current size. */* > NSTableViewRowSizeStyleSmall = 1, > NSTableViewRowSizeStyleMedium = 2, > NSTableViewRowSizeStyleLarge = 3, > } NS_ENUM_AVAILABLE_MAC(10_7); > > > So, if you set it to Small/Medium/Large then you will get some standard > metrics applied to things. Specifically, things setup to these outlets on > an NSTableCellView: > > @property (nullable, assign) IBOutlet NSTextField *textField; > @property (nullable, assign) IBOutlet NSImageView *imageView; > > > > > > corbin > > > > > > > I'm setting it to bold in outlineView:viewForTableColumn:item: by setting > view.textField.font = NSFont boldSystemFontOfSize > :view.textField.font.pointSize]. > _______________________________________________ > > Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) > > 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: > https://lists.apple.com/mailman/options/cocoa-dev/corbind%40apple.com > > This email sent to corb...@apple.com > > > _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com