Beginner questions on Themes in Godot

Godot Version

4.4

Question

I have been playing around in Theme, and I got 2 questions.

  1. Theme in Button affects all other non-Buttons?

From here, this is the starting point of the theme:

So first, I would like to change the color of the Button, so I set the new StyleBoxFlat for normal Button as seen here on the right:

But when I did that, I see the checkButton, checkBox and also other buttons are affected, even though I specified just the Button…? I also see other buttons in the color picker are also affected:

Is it possible to just tell Godot to make the theme affect just Button alone and not CheckButton, CheckBox, etc.? Or must I override all other things to circumvent this?

  1. Is it possible to specify something “globally” or “in one go” in the theme? For example, specifying all UI components to use a certain font, or specifying Border, Shadow, etc. of Button, Toggle Button, OptionButton, etc. to have a certain values in one go?

Help > UI

  1. Check Button and Check Box inherit from Button, so the theme will also affect them. You can specify CheckButton and CheckBox seperately to override just those two but I don’t think you can affect only Button.
  2. You can specify a “Default Font” in the Theme’s properties, but I’m not too sure about the others. Also theme’s are passed to child control nodes, so you only have to apply the theme to the root-most Control node for it to affect your entire scene.
1 Like