Re: Template images in sidebars drawn in wrong color
Re: Template images in sidebars drawn in wrong color
- Subject: Re: Template images in sidebars drawn in wrong color
- From: Michael Cinkosky <email@hidden>
- Date: Tue, 13 Sep 2011 16:45:42 -0600
Hi John,
Thank you very much for your response. I think you are probably pointing me to the correct answer.
As you say, the sidebar icons in Lion are grayscale, I guess, depending on what you mean by grayscale. In the app bundle, they are black with transparency. When rendered at run time in Mail, whatever was opaque black shows up as a bluish grey. When I sample the darkest color, I get R:104 G:115 B:129 (bluish in tint). When I do the same in our app, I get R:81 G:81 B:81 (grey).
So, it is this color that I am trying to influence, not the selection color. It sounds as though this behavior may be different from the behavior in older NSOutlineViews.
We will look at SourceLists in Xcode 4 to see if this addresses the issue. We still want to be able to target pre-Lion OSes, so this may need to wait before we can get all the behavior we are looking for.
Thanks again for the insight -- you have been very helpful.
Michael
On Sep 13, 2011, at 4:12 PM, John Joyce wrote:
> Sidebar icons in Lion are grayscale.
> Are you referring to the highlight/selection color?
> If you look carefully when these are reversed (some zooming app like Grab might help) some apps such as Finder might use a slightly tweaked different image for the perfect alternate image, but not for all images.
> Still it is the highlighting/selection color that gives the blue effect in Finder.
> You will notice Mail and Finder use something called a Source List for the sidebar. This is simply an NSOutlineView which is really a kind of TableView, but anyway is available in Xcode 4.
> Sourcelist is also a Highlight style option in Xcode 4 for the Table View section in Interface Builder of Xcode 4.
> You may need to do something different in code to change your highlight color/style. That will influence the color of your icons when selected.
> You might need to subclass, you might be ok with just programmatic settings.
>
>
> On Sep 13, 2011, at 4:28 PM, Michael Cinkosky wrote:
>
>>
>> We are trying to implement a new Lionesque sidebar using template images, and this is mostly working, but the color of the resulting images is grey, not the standard blue-grey I see in Apple apps. I am wondering if anyone has any insight into this that might help me avoid any further bruising on my forehead.
>>
>> Here are the details:
>>
>> We have created images for the sidebar as directed in the documentation (black with transparency). We are calling setTemplate: YES on the images before they get used. The image format and the template processing appear to be correct because the images show up reversed (as promised by the docs) when the row is selected (and if we do not call setTemplate, this does not happen). So far, so good.
>>
>> The problem is that the images are drawn in shades of black (or grey) rather than the bluish tint that the docs suggest (and that Mail, Finder, etc. demonstrate). That is, if you look at the sidebar icons in Mail, they are the nice blue-grey that the docs say we should expect. But if you look at our app, the icons are shades of grey, not blue-grey.
>>
>> We have tried reducing the alpha on the entire image (so there is no pixel with 1.0 alpha) and this does fade the resulting image, but the color is still essentially grey (that is, not enough of the sidebar blue shows through unless we reduce the alpha so much that the icons fade away).
>>
>> So, what am I missing? Perhaps there is something about NSOutlineViews that determines the foreground color for template images? Something I need to do when creating the images?
>>
>> Thanks in advance for any help you might be able to provide!
>>
>> Michael_______________________________________________
>>
>
>
_______________________________________________
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