Module: wine Branch: master Commit: d12c2f8b6ff2ea5c32655d9c23b0bfb10b3f4682 URL: http://source.winehq.org/git/wine.git/?a=commit;h=d12c2f8b6ff2ea5c32655d9c23...
Author: Nikolay Sivov nsivov@codeweavers.com Date: Sun Mar 29 10:21:16 2015 +0300
comctl32/listview: Use defined name instead of magic value.
---
dlls/comctl32/listview.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c index b3c7976..081f2a0 100644 --- a/dlls/comctl32/listview.c +++ b/dlls/comctl32/listview.c @@ -8340,9 +8340,10 @@ static BOOL LISTVIEW_SetColumnWidth(LISTVIEW_INFO *infoPtr, INT nColumn, INT cx) /* set column width only if in report or list mode */ if (infoPtr->uView != LV_VIEW_DETAILS && infoPtr->uView != LV_VIEW_LIST) return FALSE;
- /* take care of invalid cx values */ - if(infoPtr->uView == LV_VIEW_DETAILS && cx < -2) cx = LVSCW_AUTOSIZE; - else if (infoPtr->uView == LV_VIEW_LIST && cx < 1) return FALSE; + /* take care of invalid cx values - LVSCW_AUTOSIZE_* values are negative, + with _USEHEADER being the lowest */ + if (infoPtr->uView == LV_VIEW_DETAILS && cx < LVSCW_AUTOSIZE_USEHEADER) cx = LVSCW_AUTOSIZE; + else if (infoPtr->uView == LV_VIEW_LIST && cx <= 0) return FALSE;
/* resize all columns if in LV_VIEW_LIST mode */ if(infoPtr->uView == LV_VIEW_LIST)