From 3417c110cf5bc38f47ae44d845dcb55b91557d31 Mon Sep 17 00:00:00 2001 From: Oliver Tappe Date: Sun, 25 Apr 2010 12:16:50 +0000 Subject: [PATCH] Fix #5725, single pixel caret drawing artefact in an empty BTextView: * _NullStyleHeight() must return the height including the 1 pixel gap between the lines, as that's how it's being used git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36469 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/interface/TextView.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/kits/interface/TextView.cpp b/src/kits/interface/TextView.cpp index 1d37a2da15..141da02c8b 100644 --- a/src/kits/interface/TextView.cpp +++ b/src/kits/interface/TextView.cpp @@ -1792,7 +1792,6 @@ BTextView::PointAt(int32 inOffset, float *outHeight) const } else { int32 length = inOffset - line->offset; result.x += _TabExpandedStyledWidth(line->offset, length); - } } @@ -5531,7 +5530,7 @@ BTextView::_NullStyleHeight() const font_height fontHeight; font->GetHeight(&fontHeight); - return fontHeight.ascent + fontHeight.descent; + return ceilf(fontHeight.ascent + fontHeight.descent + 1); }