Godot: Add a way to define margins for the icon in Button

Created on 19 Nov 2018  路  2Comments  路  Source: godotengine/godot

There is no way to define margins for the icon in the Button class (as far a I know).

The buttons look awful without space:
image

I could offer myself to implement a proper solution for this but I'd like to hear some feedback about this. If there is a way but it is undocumented I could add it to the docs.

It would be good to know if there are more Controls with this problem.

After searching I've found this issue but it's pretty old and I'm not sure it is a good solution.

enhancement gui

Most helpful comment

If you have custom stylebox for the button, you can define a content margin for each side.
image

Maybe this just needs to be documented somewhere. I don't think there's need for a new feature.

All 2 comments

Margins and being able to pick the position (at least left or right) would be really nifty, yeah. Although I don't know if this is something that should be themable, a setting per button, or both for maximum flexibility

If you have custom stylebox for the button, you can define a content margin for each side.
image

Maybe this just needs to be documented somewhere. I don't think there's need for a new feature.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ducdetronquito picture ducdetronquito  路  3Comments

mefihl picture mefihl  路  3Comments

ndee85 picture ndee85  路  3Comments

RebelliousX picture RebelliousX  路  3Comments

SleepProgger picture SleepProgger  路  3Comments