TextEditor and Justification problem

Hi!

TextEditor::setJustification() method does not work for vertical justification.

juce::Justification::centred does not align text centred vertically.
juce::Justification::leftCentred does not align text centred vertically.
juce::Justification::verticallyCentred does not align text centred vertically.

Why?

P.S. I use custom Font: JuraLight

UPDATE: Moreover, TextEditor::setJustification() does not affect TextEditor::setTextToShowWhenEmpty() in any way…

2 Likes

We had an issue like this with juce::Justification::centred too and I found out that the top indent of the TextEditor was non-zero.

By setting editor.setIndents(editor.getLeftIndent(), 0); I got it to vertically centre as expected.

Hope this helps.