Skip to main content
Solved

Variant with auto-layout: how to put a layer with opacity on?


Luigi_Patricelli

I have a problem with components using auto layout.
I have an element and i want to put a blue layer with opacity when it is selected.
To do that i have to remove auto layout settings but when i use the component it does not fill the container because of that.

Is there a way to put a layer upon the component, using auto layout?

This is my component

This is the side effect
image

Best answer by Antoine

Hi, I’d have to see the layers and resizing properties panel to be sure but it looks like the constraints on your blue overlay aren’t properly set. Be sure to set the horizontal resizing to “Left and right” (and also vertical to “top and bottom” if you expect overrides to make your component grow).

That being said, a cleaner solution would be to change your component background color, except if you also need the overlay on elements (text, icons, etc.)

View original

2 replies

Antoine
  • New Participant
  • 145 replies
  • Answer
  • April 20, 2021

Hi, I’d have to see the layers and resizing properties panel to be sure but it looks like the constraints on your blue overlay aren’t properly set. Be sure to set the horizontal resizing to “Left and right” (and also vertical to “top and bottom” if you expect overrides to make your component grow).

That being said, a cleaner solution would be to change your component background color, except if you also need the overlay on elements (text, icons, etc.)


Luigi_Patricelli

Hi Antoine,
thanks for your reply, unfortunately change the background is not an option because i need the blue overlay over every element (text and icons).

Your tip about “left and right” constraint was useful, after a little bit of struggle (maybe more than a little bit), i reached my goal.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings