Re: NSOutlineView floating group row question
Re: NSOutlineView floating group row question
- Subject: Re: NSOutlineView floating group row question
- From: Lee Ann Rucker <email@hidden>
- Date: Sat, 14 Jun 2014 21:31:21 -0700 (PDT)
- Thread-topic: NSOutlineView floating group row question
When IB creates a SourceList style outline view in your nib, it sets the color to 49% gray instead of controlTextColor. They may look the same in a SourceList, but only controlTextColor will work correctly when selected. So I wouldn't depend on IB providing the correct defaults, and that might be what's weird about your floating groups. I had some weird behavior with them too, but I just turned them off and it's been so long I've forgotten what was wrong with them.
----- Original Message -----
From: "Bill Cheeseman" <email@hidden>
To: "Cocoa-Dev Cocoa-Dev Mail" <email@hidden>
Sent: Saturday, June 14, 2014 2:17:30 PM
Subject: Re: NSOutlineView floating group row question
On Jun 14, 2014, at 5:02 PM, Lee Ann Rucker <email@hidden> wrote:
> Actually, the "default" color you get from IB may not be the "proper" color: rdar://16040037
>
> View-based SourceList header cell default text color should not be a custom
>
> It's 49% gray, instead of a named system color. One effect of that is that it's an unreadable gray on blue when selected. It appears that the cell is treating that 49% gray as a custom color to use in all situations, rather than the color for the unselected state.
>
> Setting it to any named color, like controlTextColor or white, makes it behave itself.
I'm not sure I follow you. I haven't done anything to set or change the color of the group (header) rows' text in my source list, and it appears correct (49% gray sounds like an accurate description of what I'm seeing).
The special color I referred to in my original post ("_sourceListBackgroundColor") is an Apple named system color which is the color to use as the background color of a source list if the sourcelist, according to the HIG, serves as the primary vehicle for the user to navigate or filter an application's data. It's a private variable, but if you Google it you'll see that it is widely known and used. I think Apple should include it in the public declaration of named system colors, of which there are a few dozen. All of these system colors automatically change when a window activates and deactivates. Many Cocoa framework NSColor method parameters can't take these system named colors. I tried to use "_sourceListBackgroundColor" in my NSBox view early on, as a simple solution to one of my issues, but -[NSBox fillColor] won't accept it.
--
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
_______________________________________________
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