BaseButton Rect height does not stick

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By scottkunkel

Basebutton get instantiated with 37 height by default.

I can set the height to 75 but it does not stick

After saving the project, exiting godot and then loading the project, the button’s height is again 37.

Also, running the project, mouse_entered and mouse_exited only applies to the height of 37, even though the Rect is set to 75.

The button sits inside of a VBoxContainer. As long as it’s not a child of that everything is fine.

Godot stable 3.0.6

:bust_in_silhouette: Reply From: scottkunkel

Had to specify Min width for it to work correctly.

Should width itself work, though? possibly bug?

Not a bug that is how Godot works. It is part of it’s upside down design.

The containers are in-charge of the size of each child. A child can only control it’s own size if you make your own UI scripts for it.

If you wonder what it looks like in practice, here is a file manager I made for my game:
enter image description here

It’s containers in containers in containers in containers…
It is messy to work with especially when searching for a script. There is no arguing with the developers over it; because it works, it is fast and even the memory footprint is small.

MysteryGM | 2018-10-12 13:16