From dace9db1ef3edc032718333472861c07c8ee2918 Mon Sep 17 00:00:00 2001 From: Stefano Ceccherini Date: Fri, 22 Dec 2006 08:47:49 +0000 Subject: [PATCH] Patch by Andrea Anzani for some visual glitches: - separation lines weren't drawn correctly if the CLV was scrolled horizontally. - in some cases, when unhilighting an item, the item itself werent' drawn correctly. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19603 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/interface/ColumnListView.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/kits/interface/ColumnListView.cpp b/src/kits/interface/ColumnListView.cpp index 79a31119ea..d6a3710d96 100644 --- a/src/kits/interface/ColumnListView.cpp +++ b/src/kits/interface/ColumnListView.cpp @@ -2624,7 +2624,7 @@ void OutlineView::RedrawColumn(BColumn *column, float leftEdge, bool isFirstColu fDrawBufferView->SetHighColor(fMasterView->Color(B_COLOR_ROW_DIVIDER)); // StrokeLine(BPoint(0, line + rowHeight - 2), BPoint(Bounds().Width(), line + rowHeight - 2)); // StrokeLine(BPoint(0, line + rowHeight - 1), BPoint(Bounds().Width(), line + rowHeight - 1)); - fDrawBufferView->StrokeLine(BPoint(0, rowHeight), BPoint(Bounds().Width(), rowHeight)); + fDrawBufferView->StrokeLine(BPoint(0, rowHeight), BPoint(Bounds().right, rowHeight)); fDrawBufferView->Sync(); fDrawBuffer->Unlock(); @@ -2679,7 +2679,7 @@ void OutlineView::RedrawColumn(BColumn *column, float leftEdge, bool isFirstColu SetHighColor(fMasterView->Color(B_COLOR_ROW_DIVIDER)); // StrokeLine(BPoint(0, line + rowHeight - 2), BPoint(Bounds().Width(), line + rowHeight - 2)); // StrokeLine(BPoint(0, line + rowHeight - 1), BPoint(Bounds().Width(), line + rowHeight - 1)); - StrokeLine(BPoint(0, line + rowHeight), BPoint(Bounds().Width(), line + rowHeight)); + StrokeLine(BPoint(0, line + rowHeight), BPoint(Bounds().right, line + rowHeight)); SetHighColor(color); #endif } @@ -2857,7 +2857,7 @@ void OutlineView::Draw(BRect invalidBounds) SetHighColor(fMasterView->Color(B_COLOR_ROW_DIVIDER)); // StrokeLine(BPoint(0, line + rowHeight - 2), BPoint(Bounds().Width(), line + rowHeight - 2)); // StrokeLine(BPoint(0, line + rowHeight - 1), BPoint(Bounds().Width(), line + rowHeight - 1)); - StrokeLine(BPoint(0, line + rowHeight), BPoint(Bounds().Width(), line + rowHeight)); + StrokeLine(BPoint(invalidBounds.left, line + rowHeight), BPoint(invalidBounds.right, line + rowHeight)); SetHighColor(color); line += rowHeight + 1; } @@ -3047,6 +3047,7 @@ void OutlineView::MouseDown(BPoint position) } else if (fFocusRow != 0) { // User clicked in open space, unhighlight focus row. + FindVisibleRect(fFocusRow, &fFocusRowRect); fFocusRow = 0; Invalidate(fFocusRowRect); }