Button node size shrinking in in HBox Container

Godot Version

4.2

Question

So I made some power up cards that have a button node in them. In their individual scene the button is expanded to cover up the full card but when I put them in an Hbox Container sudden the button shrinks but everything else remains the same. The Button Node it self is using the Full Rect option in the anchor presets so I dont know why it suddenly shrinks when in an Hbox container.


The Button’s parent the Control is shrunk for the container, the texture remains scaled as that’s the texture’s size. I’m assuming you have Label as a child of the TextureRect, try moving the Button as a child of it too. Make the TextureRect the scene root.

2 Likes

Thank you so much this fixed it.