Allow CSS Opacity settings on all control group members #1885

Open
ahankinson opened this Issue Mar 28, 2013 · 13 comments

Projects

None yet

5 participants

@ahankinson
Contributor

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.

@cappbot
cappbot commented Mar 28, 2013

Milestone: Someday. Label: #new. What's next? A reviewer should examine this issue.

@ahankinson
Contributor

-#new
+Theme
+feature
+#needs-review

@cappbot
cappbot commented Mar 28, 2013

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.

@daboe01
Contributor
daboe01 commented Jun 28, 2014

alexander has argued against it on the list:
https://groups.google.com/forum/#!topic/objectivej/mJ_xPhIkEhk
should we close it?

@ahankinson
Contributor

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. ;)

+#wont-fix

@cappbot
cappbot commented Jun 28, 2014

Milestone: Someday. Labels: #wont-fix, Theme, feature. What's next? A reviewer or core team member has decided against acting upon this issue.

@cappbot cappbot closed this Jun 28, 2014
@cappbot
cappbot commented Jun 28, 2014

Milestone: Someday. Labels: #wont-fix, Theme, feature. What's next? A reviewer or core team member has decided against acting upon this issue.

@aparajita
Contributor

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.

@aljungberg
Member

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.

@ahankinson
Contributor

I'm not sure I follow. Doesn't colorWithAlphaComponent: return a CPColor with a new alpha component? How would this work with images?

@aljungberg
Member

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.

@aljungberg
Member

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.

@aparajita
Contributor

Good idea. For RGB colors we can just use rgba CSS colors in the underlying renderer.

@aparajita aparajita reopened this Jul 2, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment