Fix visual artifact !#1 described in #6530.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38783 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
db2c7eeb49
commit
54ce349f97
@ -1171,7 +1171,7 @@ TermView::_DrawCursor()
|
||||
int32 firstVisible = _LineAt(0);
|
||||
|
||||
UTF8Char character;
|
||||
uint32 attr;
|
||||
uint32 attr = 0;
|
||||
|
||||
bool cursorVisible = _IsCursorVisible();
|
||||
|
||||
@ -1340,6 +1340,28 @@ TermView::Draw(BRect updateRect)
|
||||
int32 y1 = _LineAt(updateRect.top);
|
||||
int32 y2 = std::min(_LineAt(updateRect.bottom), (int32)fRows - 1);
|
||||
|
||||
// clear the area to the right of the line ends
|
||||
if (y1 <= y2) {
|
||||
float clearLeft = fColumns * fFontWidth;
|
||||
if (clearLeft <= updateRect.right) {
|
||||
BRect rect(clearLeft, updateRect.top, updateRect.right,
|
||||
updateRect.bottom);
|
||||
SetHighColor(kTermColorTable[0]);
|
||||
FillRect(rect);
|
||||
}
|
||||
}
|
||||
|
||||
// clear the area below the last line
|
||||
if (y2 == fRows - 1) {
|
||||
float clearTop = _LineOffset(fRows);
|
||||
if (clearTop <= updateRect.bottom) {
|
||||
BRect rect(updateRect.left, clearTop, updateRect.right,
|
||||
updateRect.bottom);
|
||||
SetHighColor(kTermColorTable[0]);
|
||||
FillRect(rect);
|
||||
}
|
||||
}
|
||||
|
||||
// draw the affected line parts
|
||||
if (x1 <= x2) {
|
||||
uint32 attr = 0;
|
||||
@ -1412,15 +1434,6 @@ TermView::Draw(BRect updateRect)
|
||||
i += count;
|
||||
}
|
||||
}
|
||||
|
||||
if (y2 == fRows - 1) {
|
||||
// There may be some empty space below the last line
|
||||
BRect rect(updateRect.left, _LineOffset(fRows),
|
||||
updateRect.right, 0);
|
||||
rect.bottom = rect.top + fFontHeight - 1;
|
||||
FillRect(rect);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (fInline && fInline->IsActive())
|
||||
|
Loading…
Reference in New Issue
Block a user