How to make a check button node in godot 4.4

Using Godot 4.4 stable version.

I want to create a settingsScreen for a 2d portrait mobile game in godot 4.4, and I want to create a check button node to enable and disable vibration , but the check button node can’t be scaled because it is inside a hboxcontainer which is inside a vboxcontainer and the children of a container’s node can’t be transformed, their size , scale, position is controlled by parent (container) node . My texture images for check button node are bigger and i want to scale them down, anyone please help.

this is what a margin container is for.

and check buttons are weird, you have to change the graphics, and you need a theme for that. you are using a theme right? you should. ALWAYS use a theme for UI.

Is there any way I can send you the zip file? It’s still not working.

The default size of a check button without text is 44x24.
The button itself is about 30px wide.
Your button in the image is 500px wide without the text.
Something might be scaling the thing.
Or is it possible you have set the Custom Minimum Size values?
I don’t see the containers up-sizing it unless you have scaling set for one or more of those.
You can try pulling it out of the containers, setting it size, and then putting it back into the container.
If you upload it to Github I will look at it.

This is the link of project file.

You are using a custom image for the checkbox and that image is 663x350.
Since you are using the containers the button cannot use its own scaling (it takes it from the parent).
So you have 2 choices as far as I can see:

  1. Set the custom minimum size for all the controls under the top level container (VBoxContainer) and scale that container down. (This is probably going to lead to all kinds of alignment issues)
  2. In a graphics editor scale the image you are using down. I prefer this option because there is no need to carry 210000+ pixel image that you are only going to scale down anyway. Nowhere are you going to use it a full size.

Note: When using containers I like to always set custom minimum size for nodes contained.

I have updated the project file, and my problem is solved but now’s there another problem, is there any way I can scale the text size of a option button node’s drop down menu options, which are hard to see because the default text size is small.

Please help.

Unfortunately the two displays are connected to the same theme_override font_size.

I also could not change the font of the dropdown text however this post says to change the theme.
I tried it and changing the font size of the optionbutton alone didn’t seem to do anything. However changing the default font size of the theme itself did work.
Caveat…I don’t fully understand the beast that is the theme editor.