Currently CSS opacity is used on just a certain subset of CPControls (checkboxes, radio groups), while dedicated disabled images are used for others (buttons, popup/pulldown, steppers, textfields).
I would suggest introducing CSS opacity controls for all CPControls, allowing disabled visual states to be set via CSS opacity. This would remove the need to have dedicated disabled images for most controls.
Milestone: Someday. Label: #new. What's next? A reviewer should examine this issue.
Milestone: Someday. Labels: #needs-review, Theme, feature. What's next? This issue is pending an architectural or implementation design decision and should be discussed or voted on.
alexander has argued against it on the list:
should we close it?
I'm biased, but I would still like to see enabled/disabled states implemented via CSS opacity.
In my experience, the CSS implementation is a lot easier to tweak by just changing a numeric value. Dedicated images require a dedicated image editor, and slicing and dicing, and then realizing that you got the opacity value slightly wrong and then having to do it again. It's a pain.
But sure, we can close this one. Looks like I lost this argument. ;)
Milestone: Someday. Labels: #wont-fix, Theme, feature. What's next? A reviewer or core team member has decided against acting upon this issue.
I have discussed the CSS issue with Alexander in the past, and we are not against the idea of providing some way of allowing the user to use CSS, as long as they understand that it is officially unsupported. But that will have to wait for Cappuccino 1.0, there are more pressing issues.
Just to add a final thought here. Maybe as an alternative we could open a new issue for a new feature: allowing CPColor colorWithAlphaComponent to work even with image patterns. This would be a simple change in CPColor and should be usable in theming out of the box.
I'm not sure I follow. Doesn't colorWithAlphaComponent: return a CPColor with a new alpha component? How would this work with images?
Yes it returns a new CPColor with a different alpha component. It'd work in an analogous way for images, where a fully opaque image would become more transparent by the factor specified. More precisely we'd multiply the alpha component with the alpha component of each pixel in the image when displaying it.
So as an example, maybe you have an image which is an opaque button. Now you want to use exactly the same image for a disabled button. So you'd do [theNormalBezelImageColor colorWithAlphaComponent:0.7] to get a modified version that's slightly transparent.
Good idea. For RGB colors we can just use rgba CSS colors in the underlying renderer.