Two things:
I would like a caret that is 1-pixel wide. Or the ability to set it. If this could be done through the look and feel that would be awesome, because my TextEditor is the one that the Label creates, so I don’t have direct access to it (although I suppose I could override Label::createEditorComponent()).
The second issue is that TextEditor::getCaretRectangle uses a different formula for calculating the caret rectangle than the actual drawing code:
return Rectangle<int> (roundToInt (cursorX) - viewport->getX(),
roundToInt (cursorY) - viewport->getY(),
1, roundToInt (cursorHeight));
versus
g.fillRect (borderSize.getLeft() + textHolder->getX() + leftIndent + cursorX,
borderSize.getTop() + textHolder->getY() + topIndent + cursorY,
2.0f, cursorHeight);
I personally think TextEditor::paintOverChildren() should just do the equivalent of Graphics::fillRect (getCaretRectangle()) this way the calculation for the rectangle will always agree with what is drawn.
And I apologize in advance for nit picking, yes I realize we are talking about a one pixel difference! It’s just that my font size is small and it already looks bad enough unhinted (cough), that a 2-pixel caret is making the text hard to read when it’s in edit mode.