Module: wine Branch: master Commit: 749d975a41bdbccf8a96d45ae305f4cc15c7d402 URL: http://source.winehq.org/git/wine.git/?a=commit;h=749d975a41bdbccf8a96d45ae3...
Author: Mikołaj Zalewski mikolaj@zalewski.pl Date: Sat Jan 13 23:50:23 2007 +0100
comctl32: listview: When shrinking the last column clear the now unused field.
---
dlls/comctl32/listview.c | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c index a2deee3..bc0db87 100644 --- a/dlls/comctl32/listview.c +++ b/dlls/comctl32/listview.c @@ -8611,10 +8611,16 @@ static LRESULT LISTVIEW_HeaderNotificati /* resizing left-aligned columns leaves most of the left side untouched */ if ((lpColumnInfo->fmt & LVCFMT_JUSTIFYMASK) == LVCFMT_LEFT) { - INT nMaxDirty = infoPtr->nEllipsisWidth + infoPtr->ntmMaxCharWidth + dx; + INT nMaxDirty = infoPtr->nEllipsisWidth + infoPtr->ntmMaxCharWidth; + if (dx > 0) + nMaxDirty += dx; rcCol.left = max (rcCol.left, rcCol.right - nMaxDirty); } - + + /* when shrinking the last column clear the now unused field */ + if (lpnmh->iItem == DPA_GetPtrCount(infoPtr->hdpaColumns) - 1 && dx < 0) + rcCol.right -= dx; + LISTVIEW_InvalidateRect(infoPtr, &rcCol); } }