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);
|
wxPen pen(GetRuleColour(), 1, wxSOLID);
|
||||||
wxSize clientSize = GetClientSize();
|
wxSize clientSize = GetClientSize();
|
||||||
|
|
||||||
// Don't draw the first one
|
size_t i = visibleFrom;
|
||||||
for ( size_t i = visibleFrom + 1; i <= visibleTo; i++ )
|
if (i == 0) i = 1; // Don't draw the first one
|
||||||
|
for ( ; i <= visibleTo; i++ )
|
||||||
{
|
{
|
||||||
dc.SetPen(pen);
|
dc.SetPen(pen);
|
||||||
dc.SetBrush( *wxTRANSPARENT_BRUSH );
|
dc.SetBrush( *wxTRANSPARENT_BRUSH );
|
||||||
@@ -2806,8 +2807,10 @@ void wxListMainWindow::OnPaint( wxPaintEvent &WXUNUSED(event) )
|
|||||||
{
|
{
|
||||||
int colWidth = GetColumnWidth(col);
|
int colWidth = GetColumnWidth(col);
|
||||||
x += colWidth;
|
x += colWidth;
|
||||||
dc.DrawLine(x - dev_x - 2, firstItemRect.GetY() - 1 - dev_y,
|
int x_pos = x - dev_x;
|
||||||
x - dev_x - 2, lastItemRect.GetBottom() + 1 - dev_y);
|
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