Text Position When Editing Labels and Text Editor

Why does the position of the text jump down a couple pixels when editing text inside labels and text boxes? It’s super annoying. Further, why does the text jump to a left justification when I have it set to ‘center’? Also super annoying. Can this be altered with look and feel? Or can it just be fixed in general?

vk

The text editor doesn’t support centre justification, so that’s why it jumps to the left.

TBH I’d never noticed the vertical alignment when you edit labels, but I’ll take a look.

…ok, just had a look, and the text stays absolutely still when you edit it… (?)

You’re not talking about some ancient juce version, are you?

Jules, et al

I just downloaded JUCE and ran into the same issue described in this old thread ie.  text moving around in a label when editing or not.

Here are screenshots from my OSX build.  IOS looks identical:

 

https://dl.dropboxusercontent.com/u/9116971/JUCE-LabelEditing.png

https://dl.dropboxusercontent.com/u/9116971/JUCE-LableNotEditing.png

(I tried to upload these using the attachment feature, but it failed for some reason. Not sure why given they are png and well < 1MB.)

 

This seems like an unusual default behavior. Perhaps I'm doing something wrong?

 

Thanks!

-Gerald

I am also noticing the same issue with text moving around when editing a label . The highlight also flickers when you triple click which it should not do. I am on mac osx 10.10

The TextEditor class doesn't yet support centred justification, which is why it looks like that. Adding justification support is in our backlog...

But I am noticing this in the IntroJucer textEditors. Everytime you highlight a textField the text drops down a few pixels. And that text is left justified.

Any idea how to fix the few pixels drop? I removed borders, so far no luck

IIRC I override LnF getLabelBorderSize to fix that. But it seems that you already tried that.

I do have the text jumping a pixel too when I get the focus. It either go up or down.
JUCE v7.0.6 on Linux.

I ultimately had to rely on using TextEditor::setIndents() inside my LnF override of fillTextEditorBackground() (which also draws the text), in order to position it for the font I am using to not change position.