Help! UMG, Image can't fill with Horizontal Alignment

I have placed the Image component below the Button component, when I try to use horizontal fill for the Image component, I found that the left and right sides are not filled but there is a gap, this problem was found in UE5.1 version, I tried in UE4.27 version and found that there is no such problem, I would like to ask you all how to solve this problem in UE5, thank you!

UE5:

UE4:

1 Like

At a glance this appears to be a bug. There’s been some regression in UMG.

Does it also manifest with another native widget, like a border?

If so, then my advice would be to get the latest engine version.

See below → weird default button padding.

Version 5.3 has the same problem! It’s hard. :tired_face:

1 Like

Is the button modified in any way?

edit: so yeah, this seems to be a standard behaviour now, which does not seem right, indeed.

edit2: found it:

You can set it to 0 or a non-0 value. But 12 would mean 12px from each side.

2 Likes

I had this issue and the above post solved it! Thank you! I was about to rip my hair out!

Let me try to help you, go to the button you are assigning image and in the search bar type padding, go to style and make all of them 0 and that will fix it instantly