, __columnCursorIndex(-1)
, __isPasswordVisible(false)
, __needToCreateCopyPastePopup(false)
+ , __calculatedCursorBounds(FloatRectangle(0.0f, 0.0f, 0.0f, 0.0f))
{
}
(cursorBounds.y < textBounds.y + textBounds.height))
{
float cursorHeightDiff = cursorBounds.y + cursorBounds.height - textBounds.y - textBounds.height - 1.0f;
- cursorBounds.height -= cursorHeightDiff;
+ if (cursorHeightDiff > 0.0f)
+ {
+ cursorBounds.height -= cursorHeightDiff;
+ }
+ else
+ {
+ cursorBounds.height += cursorHeightDiff;
+ }
}
if (__pEdit->GetEditStyle() & EDIT_STYLE_SINGLE_LINE)
}
}
}
-
+ __calculatedCursorBounds = cursorBounds;
return E_SUCCESS;
}
(cursorBounds.y < textBounds.y + textBounds.height))
{
float cursorHeightDiff = cursorBounds.y + cursorBounds.height - textBounds.y - textBounds.height - 1.0f;
- cursorBounds.height -= cursorHeightDiff;
+ if (cursorHeightDiff > 0.0f)
+ {
+ cursorBounds.height -= cursorHeightDiff;
+ }
+ else
+ {
+ cursorBounds.height += cursorHeightDiff;
+ }
}
if (__pEdit->GetEditStyle() & EDIT_STYLE_SINGLE_LINE)
}
}
}
-
+ __calculatedCursorBounds = cursorBounds;
return E_SUCCESS;
}
if (cursorHeight > 0.0f)
{
- absCursorBounds.height = cursorHeight;
+ if (cursorHeight <= __calculatedCursorBounds.height)
+ {
+ absCursorBounds.height = cursorHeight;
+ }
+ else
+ {
+ absCursorBounds.height = __calculatedCursorBounds.height;
+ }
}
else
{
if (cursorHeight > 0.0f)
{
- absCursorBounds.height = cursorHeight;
+ if (cursorHeight <= __calculatedCursorBounds.height)
+ {
+ absCursorBounds.height = cursorHeight;
+ }
+ else
+ {
+ absCursorBounds.height = __calculatedCursorBounds.height;
+ }
}
else
{