Possibly GUI bug?

Maybe I’m setting this up weird, but for some reason when a resize or window movement is triggered the “BottomPanel” scales up to 100% instead of staying at the set pixel height it was assigned to?

I had this come up in a project here but could not figure out why. So mocked up the same element chain in the playground and bam, it does it here to.

It seems to be tied to the last image stretch extend? If I change it to stretch fill its all good so I just did that of course, but figured id as if that is the intended behavior?

cc @RaananW

Checking! thanks for the reproduction :slight_smile:

STRETCH_EXTEND is actually meant to work this way. When setting your image to stretch extend the image’s parent will have these 2 flags set:

// Will update root size if root is not the top root
this.parent.adaptWidthToChildren = true;
this.parent.adaptHeightToChildren = true;

STRETCH_FILL (as you mentioned) will work as you expect. The error is actually the fact that it doesn’t happen on the first frame :slight_smile:
I’ll check that.

Have you expected a different behavior from STRETCH_EXTEND?

1 Like

Nope, just did not expect it. I kind of thought Fill would make it so the largest axis was filled without distorting the ratio, while extend would just distort it to fill the space but that was totally just an assumption. Good to know this is how its supposed to work!

Its just weird that it changes its parent height to 100 on a resize or move, but it sounds like you are gonna look into it <3

1 Like