Commit 71cf0a31 authored by Mark Jansen's avatar Mark Jansen Committed by Alexandre Julliard

comctl32/listview: Include the checkbox in column width calculation.

parent e00a2379
......@@ -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 */
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment