Module: wine Branch: master Commit: 71cf0a31d99febf0e260fdc1552465529144bde9 URL: https://source.winehq.org/git/wine.git/?a=commit;h=71cf0a31d99febf0e260fdc15...
Author: Mark Jansen mark.jansen@reactos.org Date: Tue Feb 6 15:37:39 2018 +0300
comctl32/listview: Include the checkbox in column width calculation.
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/comctl32/listview.c | 2 ++ dlls/comctl32/tests/listview.c | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c index c085578..0d7f7ec 100644 --- a/dlls/comctl32/listview.c +++ b/dlls/comctl32/listview.c @@ -8406,6 +8406,8 @@ static BOOL LISTVIEW_SetColumnWidth(LISTVIEW_INFO *infoPtr, INT nColumn, INT cx) if (infoPtr->himlSmall && (nColumn == 0 || (LISTVIEW_GetColumnInfo(infoPtr, nColumn)->fmt & LVCFMT_IMAGE))) max_cx += infoPtr->iconSize.cx; max_cx += TRAILING_LABEL_PADDING; + if (nColumn == 0 && (infoPtr->dwLvExStyle & LVS_EX_CHECKBOXES)) + max_cx += GetSystemMetrics(SM_CXSMICON); }
/* autosize based on listview items width */ diff --git a/dlls/comctl32/tests/listview.c b/dlls/comctl32/tests/listview.c index 0506eaa..c9a165c 100644 --- a/dlls/comctl32/tests/listview.c +++ b/dlls/comctl32/tests/listview.c @@ -6298,7 +6298,6 @@ static void test_LVSCW_AUTOSIZE(void)
width2 = SendMessageA(hwnd, LVM_GETCOLUMNWIDTH, 0, 0); ok(width2 > 0, "Unexpected column width %d.\n", width2); -todo_wine ok(width2 > width, "Expected increased column width.\n");
/* Turn off checkboxes. */ @@ -6310,7 +6309,6 @@ todo_wine
width = SendMessageA(hwnd, LVM_GETCOLUMNWIDTH, 0, 0); ok(width > 0, "Unexpected column width %d.\n", width2); -todo_wine ok(width2 > width, "Expected reduced column width.\n");
DestroyWindow(hwnd);