StackPanel spacing doesn't scale properly with AdvancedDynamicTexture that has an ideal size

Hello,

I recently made a post about TextBlock.shadowOffset not scaling properly when added to an AdvancedDynamicTexture that has and ideal size set.
(Shadow offset of a textBlock doesn't scale properly with AdvancedDynamicTexture that has an ideal size)

I found another issue similar to that one, this time regarding StackPanel and spacing. Since the other issue was a bug with the engine, I’m inclined to believe this one is as well.

I created a playground replicating the issue: https://playground.babylonjs.com/#B6DRYU#2

Thanks

cc @georgie / @amoebachant

here is the fix @dinutaleanu note in your playground u would have to change the spacing a bit for it to fit in canvas initially (i set to 50 and it looks good)

Update stackpanel to respect idealratio by georginahalpern · Pull Request #17401 · BabylonJS/Babylon.js

2 Likes