* the textrect.right should always be rounded up to the next integer -
fixes #4894 * PointAt() now rounds x- and y-positions to the next integer instead of always rounding them up - this yields improved caret-positions (e.g. before an 'f' character) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33877 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
85a7877f80
commit
baa3366093
@ -1809,8 +1809,8 @@ BTextView::PointAt(int32 inOffset, float *outHeight) const
|
||||
result.x += fTextRect.left;
|
||||
|
||||
// round up
|
||||
result.x = ceilf(result.x);
|
||||
result.y = ceilf(result.y);
|
||||
result.x = lroundf(result.x);
|
||||
result.y = lroundf(result.y);
|
||||
if (outHeight != NULL)
|
||||
*outHeight = height;
|
||||
|
||||
@ -3792,7 +3792,7 @@ BTextView::_RecalculateLineBreaks(int32 *startLine, int32 *endLine)
|
||||
fTextRect.bottom = fTextRect.top + newHeight;
|
||||
if (!fWrap) {
|
||||
fMinTextRectWidth = fLines->MaxWidth();
|
||||
fTextRect.right = fTextRect.left + fMinTextRectWidth;
|
||||
fTextRect.right = ceilf(fTextRect.left + fMinTextRectWidth);
|
||||
}
|
||||
|
||||
*endLine = lineIndex - 1;
|
||||
|
Loading…
Reference in New Issue
Block a user