Godot Version
v4.6.1.stable.mono.official [14d19694e]
Question
How to change button text margin (so there is more space between text and edges of the button) programatically?
I have no idea how to do it, I’ve tried it like that but it doesn’t work. Not really surprising though, since you can only change button margin through theme, there are no margin properties on button.
button.AddThemeConstantOverride("margin_left", 2);
button.AddThemeConstantOverride("margin_right", 2);