From: Nikolay Sivov nsivov@codeweavers.com
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=58072 Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/comctl32/listview.c | 4 ++-- dlls/comctl32/tests/listview.c | 1 - 2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c index 54cd452ce81..169aacd01ba 100644 --- a/dlls/comctl32/listview.c +++ b/dlls/comctl32/listview.c @@ -8472,8 +8472,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); + if (nColumn == 0 && infoPtr->himlState) + max_cx += infoPtr->iconStateSize.cx; }
/* autosize based on listview items width */ diff --git a/dlls/comctl32/tests/listview.c b/dlls/comctl32/tests/listview.c index 0b52678a496..b4748ffe5e2 100644 --- a/dlls/comctl32/tests/listview.c +++ b/dlls/comctl32/tests/listview.c @@ -7033,7 +7033,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");
DestroyWindow(hwnd);