Align options in editable text box

Hello.

Vertical align in editable text box has changed to valign-top in 4.12.

In 4.11 It have incorrect positioning behavior in editor with zoom-in/out action.

103655-textbox+vertical+align+.gif

It is gone, but I cannot vertically center the content. And If I manually center in vertical axis, the offset of background is affected. Text and background was distinguished in 4.11 (SEditableText::OnPaint). In 4.12 it calls FSlateEditableTextLayout::OnPaint and it does not distinguish background and text that just draws 0, 0 from AllottedGeometry as parameter.

Is this a bug? If not, how can I set vertical alignment without affecting background?

Hey,

Yeah, I’d noticed this myself. It was a side-effect of converting of SEditableText to use a text layout. I’ve made a change in CL# 3037037 to have the outer SEditableTextBox set the vertical alignment, which works correctly with zooming too.

This will be fixed in 4.13, or you can just apply the change to 4.12. In case you can’t see that CL, you need to go to SEditableTextBox::Construct and set the PaddingBox to use .VAlign(VAlign_Center).

Thanks,
Jamie.