Implemented StringWidth in ServerFont, updated ServerApp to use it, and removed a -1 from TextView in the char location calculation, which I didn't understand and without which the cursor location and related stuff now finally work.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12744 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1783,7 +1783,10 @@ BTextView::PointAt(int32 inOffset, float *outHeight) const
|
||||
result.x += modifier;
|
||||
}
|
||||
// convert from text rect coordinates
|
||||
result.x += fTextRect.left - 1.0;
|
||||
// NOTE: I didn't understand why "- 1.0"
|
||||
// and it works only correct without it on Haiku app_server.
|
||||
// Feel free to enlighten me though!
|
||||
result.x += fTextRect.left;// - 1.0;
|
||||
|
||||
// round up
|
||||
result.x = ceil(result.x);
|
||||
|
||||
Reference in New Issue
Block a user