Godot Version
4.4
Question
I watched tutorials, tried reading docs, but it seems I am either too stupid or missing something…
I want to scale big button on the left. It sits in HboxContainer, together with its sibling Panel that is visible on screen. Panel is set to expand.
Nothing I try with the big button works it will stay that big no matter what. I try to work with strech on both Panel and the big button and its box
What could be the root cause?
Have you tried setting the minimum size?
The TextureButton has two label siblings that may take up space, doesn’t seem like you are setting the button itself to stretch, just it’s parent the VBoxContainer. Texture may also have seperate setting prevent expansion, check out the TextureButton’s stretch mode and “Ignore Texture Size” options
your root node is a Control. you need to set it to full rect, then you need something to hold your items.
your hbox is set to bottom.
if you want padding between the left panel and the center panel, you need a Control in-between with minimum size
X
.
hbox
|->left panel
|-> invisible Control
|-> center panel
if you want the left panel to be on the left corner, use a control instead of the hbox and set the left panel to bottom left corner. or just place the panel as child of the root.
control
|->left panel (set left bottom corner)
|->center panel (set bottom center)
root
|->left panel
|->hbox
|->center panel
if you want your panels covering the entire space of the hbox and for expand to work, the hbox should either be set to horizontal expand, or set a minimum size
.
1 Like
thank you everyone, I will digest it and try to work on it tomorrow . I probably need to review every element of the UI to see if it is set correctly and apply what you suggest.
right now, after some quick experimental changes and ignoring texture size options, I got to following:
but if the unit has only 2 abilities, the icons get bigger:
I understand why it happens , but a task for tomorrow will be to find a way to force it to constant size . Right now brain hurts 
the buttons get bigger because they are set to expand and there is no minimum size.
set only horizontal
to expand (on the buttons) and give the vbox
a min size
to force all the buttons into the same size.
or set a minimum size
for the buttons
and disable expand to make the buttons change the size of the vbox container
.