The TextEdit field appears to have this weird padding unrelated to the stylebox. Anyone know how to get rid of that? I want it to conform to the text like a Label (so that it will accurately wrap to how the label will display it), but I have had no success in figuring out where this padding is getting added.
The padding above and to the right of the text. There is only one line, so line_spacing has little effect. Also, I want the lines to be spaced normally when the user enters text in.
This is a TextEdit field, so I cannot center the text (nor would I wish to, as it is intended for user input). The node is currently set to fit content height and width, but toggling these has no effect on the padding. The stylebox has some left padding, as otherwise the text will touch the left edge of the field, but it has no padding otherwise (setting these to zero has no effect). The padding does not come from the stylebox as mentioned above.
Do you need multiline? If not, LineEdit might be easier to work with.
There are other values that can affect the padding; there’s an expand thing that pushes the stylebox outside of its nominal bounding rectangle, for example.
I do need to multiline. Expand Margins appears to have no effect on this node, which is in a VBoxContainer; but I doubt it would be relevant anyway, as this is not a margin, it is padding.
It’s not going to affect the end spacing because it’s multiline and editable. I could be wrong, but I don’t think you can get TextEdit to auto-center the current text like that unless you set it to center justify.
It’s not an issue of the size of the contents. The issue is that, regardless of whether you set it to fit content or scroll, there is always right padding in the node, preventing the text from wrapping correctly. It doesn’t make any sense why it would not be designed to do that, given that it has autowrap, and you can hide the scroll bars.
Here is a mockup of what I mean. The TextEdit field on the left has been given StyleBoxEmpty to match the right Label. They both have the same font and font size (the default for Godot). They do not wrap the same, for no apparent reason.
The line spacing is largely irrelevant to my concern. I can adjust the line spacing. I cannot adjust the padding.
The TextEdit doesn’t need to display exactly the same as the Label. But it has no chance of displaying anywhere close to the Label if this padding is not editable and the two therefore do not wrap the same way. This seems like a major oversight. Wouldn’t it be considered a normal use case to enter text into a TextEdit to be displayed in a Label?