You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Opacity is a property of a control that I can see recurring quite often. Right now there isn't really any way of making an entire control transparent. You'd have to multiply all the colours with the alpha and somehow not accidentally override that even if you're a few levels down in the control hierarchy.
My suggestion is to add an Opacity property to controls in a similar vain to the Frame. That is, a control can set its own immediate opacity (default = 1), which will then be multiplied by the parent opacity for the final calculated value.
While renderers will still have to keep this value in mind manually, it will at least make sure entire subtrees of controls are made transparent correctly.
The text was updated successfully, but these errors were encountered:
One thing I was thinking is whether there are going to be other properties of controls beyond Frame and Opacity that exercise the same behaviour, where the evaluated values are dependent on a parent value. If we expect it to be (many) more, we should consider whether there should be a general framework for "propagated properties" like that.
We already have an IsVisible, which is arguably very rendering-based too, though it does include logic around mouse input I suppose. Opacity is just a continuous variant of visibility, but I can see your point about it being much more of a rendering thing.
Still, properties that propagate like this are something I need right now, so I'd love to find a solution for it. If not by adding the Opacity directly, then somehow else, because I could see these being something we'd want to do more often.
Opacity is a property of a control that I can see recurring quite often. Right now there isn't really any way of making an entire control transparent. You'd have to multiply all the colours with the alpha and somehow not accidentally override that even if you're a few levels down in the control hierarchy.
My suggestion is to add an
Opacity
property to controls in a similar vain to theFrame
. That is, a control can set its own immediate opacity (default = 1), which will then be multiplied by the parent opacity for the final calculated value.While renderers will still have to keep this value in mind manually, it will at least make sure entire subtrees of controls are made transparent correctly.
The text was updated successfully, but these errors were encountered: