Minor formatting fixes to recently changed wxListCtrl code
No real changes.
This commit is contained in:
@@ -3107,18 +3107,17 @@ void wxListCtrl::OnPaint(wxPaintEvent& event)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
The drawing can be clipped horizontally to the rightmost column. This
|
The drawing can be clipped horizontally to the rightmost column.
|
||||||
happens when an item is added (and visible) and results in a
|
This happens when an item is added (and visible) and results in a
|
||||||
horizontal rule being clipped instead of drawn across the entire list
|
horizontal rule being clipped instead of drawn across the entire
|
||||||
control. In that case we request for the part to the right of the
|
list control. In that case we request for the part to the right of
|
||||||
rightmost column to be drawn as well.
|
the rightmost column to be drawn as well.
|
||||||
*/
|
*/
|
||||||
if ( clipRect.GetRight() != clientSize.GetWidth() - 1
|
if ( clipRect.GetRight() != clientSize.x - 1 && clipRect.width )
|
||||||
&& clipRect.width)
|
|
||||||
{
|
{
|
||||||
RefreshRect(wxRect(clipRect.GetRight(), clipRect.y,
|
RefreshRect(wxRect(clipRect.GetRight(), clipRect.y,
|
||||||
clientSize.x - clipRect.width, clipRect.height),
|
clientSize.x - clipRect.width, clipRect.height),
|
||||||
false /* erase background? */);
|
false /* don't erase background */);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3135,20 +3134,20 @@ void wxListCtrl::OnPaint(wxPaintEvent& event)
|
|||||||
|
|
||||||
The drawing of the rectangle as a fix to erase trailing pixels
|
The drawing of the rectangle as a fix to erase trailing pixels
|
||||||
when resizing a column is only needed for ComCtl32 prior to
|
when resizing a column is only needed for ComCtl32 prior to
|
||||||
6.0, i.e. when not using a manifest in which case 5.82 is
|
6.0, i.e. when not using a manifest in which case 5.82 is used.
|
||||||
used. And even then it only happens when "Show window contents
|
And even then it only happens when "Show window contents while
|
||||||
while dragging" is enabled under Windows, resulting in live
|
dragging" is enabled under Windows, resulting in live updates
|
||||||
updates when resizing columns. Note that even with that setting
|
when resizing columns. Note that even with that setting on, at
|
||||||
on, at least under Windows 7 and 10 no live updating is done when
|
least under Windows 7 and 10 no live updating is done when
|
||||||
using ComCtl32 5.82.
|
using ComCtl32 5.82.
|
||||||
|
|
||||||
Revision b66c3a67519caa9debfd76e6d74954eaebfa56d9 made this fix
|
Revision b66c3a67519caa9debfd76e6d74954eaebfa56d9 made this fix
|
||||||
almost redundant, except that when you do NOT handle
|
almost redundant, except that when you do NOT handle
|
||||||
EVT_LIST_COL_DRAGGING (or do and skip the event) the trailing
|
EVT_LIST_COL_DRAGGING (or do and skip the event) the trailing
|
||||||
pixels still appear. In case of wanting to reproduce the problem
|
pixels still appear. In case of wanting to reproduce the
|
||||||
in the listctrl sample: comment out handling oF
|
problem in the listctrl sample: comment out handling oF
|
||||||
EVT_LIST_COL_DRAGGING and also set useDrawFix to false and gap to
|
EVT_LIST_COL_DRAGGING and also set useDrawFix to false and gap
|
||||||
2 (not 0).
|
to 2 (not 0).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static const bool useDrawFix = wxApp::GetComCtl32Version() < 600;
|
static const bool useDrawFix = wxApp::GetComCtl32Version() < 600;
|
||||||
|
Reference in New Issue
Block a user