# UMG - Size calculation error

**URL:** <https://forums.unrealengine.com/t/umg-size-calculation-error/324074>\
**Category:** UI\
**Tags:** unreal-engine, bug-report, question, UMG\
**Created:** [July 4, 2015, 5:07pm UTC](https://forums.unrealengine.com/t/umg-size-calculation-error/324074 "2015-07-04T17:07:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Elvince](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Elvince](https://forums.unrealengine.com/u/Elvince)\
**Post date:** [July 4, 2015, 5:07pm UTC](https://forums.unrealengine.com/t/umg-size-calculation-error/324074/1 "2015-07-04T17:07:02Z")

</div>

Hi,

Create an widget with an overlay as the root  
the first child is a overlay with an image of 128\*128  
The 2nd child is a text with a top -200  
All child are Align V and H centered

Create an animation of the firt child overlay on its scale to move from 0.5 to 1 on X/Y axis

If you place the widget inside another widget, you won’t see the text.  
The size calculated for the widget just take the largest size use by the 1st child with the largest scale.

If you remove the top -200 on the 2nd child, you will see the text.

I hope you can repro & fix this.

Thanks

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_e729f54e](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_e729f54e](https://forums.unrealengine.com/u/anonymous_user_e729f54e)\
**Post date:** [July 6, 2015, 9:10pm UTC](https://forums.unrealengine.com/t/umg-size-calculation-error/324074/2 "2015-07-06T21:10:19Z")

</div>

Hello,

I believe that this function of UMG is working as intended. Negative padding would place the text out side of the box. Have you tried using a vertical box and with a padding for a the text of 200 on the bottom? Let me know if this works for you.

---

<div class="post-metadata">

**Author:** ![Elvince](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Elvince](https://forums.unrealengine.com/u/Elvince)\
**Post date:** [July 10, 2015, 9:14am UTC](https://forums.unrealengine.com/t/umg-size-calculation-error/324074/3 "2015-07-10T09:14:48Z")

</div>

Hi,

I miss one things:  
Eeverything is center align Vertically and horizontally. So doing top minus value is putting the text outside the widget.  
More, I also did a text with the bottom value and it’s the same value, it’s not taken into account in the Widget Size calculation.

How you are to repro this?  
Widget setup

 ![49777-paddingissue.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/b/1/7b1c6c332cee258c98360f8da9ac2ffa5c2406e5.png)

What you see when you add it:

 ![49778-paddingissue2.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/b/3/eb392f3cbc578b28f9109c0f2a94bc86ea93b958.png)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_e729f54e](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_e729f54e](https://forums.unrealengine.com/u/anonymous_user_e729f54e)\
**Post date:** [July 10, 2015, 2:58pm UTC](https://forums.unrealengine.com/t/umg-size-calculation-error/324074/4 "2015-07-10T14:58:20Z")

</div>

Hello,

I was able to reproduce this issue on our end. I have written up a report ( UE-18439) and I have submitted it to the developers for further consideration. I will provide updates with any pertinent information as it becomes available. Thank you for your time and information.

Make it a great day
