Correct grid lines in wxListCtrl (I cannot find the
bug report anymore) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@46608 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -2771,8 +2771,9 @@ void wxListMainWindow::OnPaint( wxPaintEvent &WXUNUSED(event) )
|
||||
wxPen pen(GetRuleColour(), 1, wxSOLID);
|
||||
wxSize clientSize = GetClientSize();
|
||||
|
||||
// Don't draw the first one
|
||||
for ( size_t i = visibleFrom + 1; i <= visibleTo; i++ )
|
||||
size_t i = visibleFrom;
|
||||
if (i == 0) i = 1; // Don't draw the first one
|
||||
for ( ; i <= visibleTo; i++ )
|
||||
{
|
||||
dc.SetPen(pen);
|
||||
dc.SetBrush( *wxTRANSPARENT_BRUSH );
|
||||
@@ -2806,8 +2807,10 @@ void wxListMainWindow::OnPaint( wxPaintEvent &WXUNUSED(event) )
|
||||
{
|
||||
int colWidth = GetColumnWidth(col);
|
||||
x += colWidth;
|
||||
dc.DrawLine(x - dev_x - 2, firstItemRect.GetY() - 1 - dev_y,
|
||||
x - dev_x - 2, lastItemRect.GetBottom() + 1 - dev_y);
|
||||
int x_pos = x - dev_x;
|
||||
if (col < GetColumnCount()-1) x_pos -= 2;
|
||||
dc.DrawLine(x_pos, firstItemRect.GetY() - 1 - dev_y,
|
||||
x_pos, lastItemRect.GetBottom() + 1 - dev_y);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user