GUI: Draw caret over the whole height of the edit rect.

This improves the look of the editable widgets.
This commit is contained in:
Johannes Schickel 2013-11-24 00:11:01 +01:00
parent bb4a730a88
commit 3be846cfd7

View File

@ -263,13 +263,13 @@ void EditableWidget::drawCaret(bool erase) {
x += getCaretOffset();
if (y < 0 || y + editRect.height() - 2 > _h)
if (y < 0 || y + editRect.height() > _h)
return;
x += getAbsX();
y += getAbsY();
g_gui.theme()->drawCaret(Common::Rect(x, y, x + 1, y + editRect.height() - 2), erase);
g_gui.theme()->drawCaret(Common::Rect(x, y, x + 1, y + editRect.height()), erase);
if (erase) {
if ((uint)_caretPos < _editString.size()) {