Commit 2a32ce74 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

comctl32/listview: Improve item position calculating in LVS_REPORT.

parent 25c775a0
......@@ -1920,7 +1920,10 @@ static void LISTVIEW_GetItemOrigin(const LISTVIEW_INFO *infoPtr, INT nItem, LPPO
}
else /* LVS_REPORT */
{
lpptPosition->x = 0;
lpptPosition->x = REPORT_MARGINX;
/* item is always at zero indexed column */
if (DPA_GetPtrCount(infoPtr->hdpaColumns) > 0)
lpptPosition->x += LISTVIEW_GetColumnInfo(infoPtr, 0)->rcHeader.left;
lpptPosition->y = nItem * infoPtr->nItemHeight;
}
}
......
......@@ -2538,7 +2538,7 @@ static void test_getitemposition(void)
memset(&rect, 0, sizeof(rect));
SendMessage(header, HDM_GETITEMRECT, 0, (LPARAM)&rect);
/* some padding? */
todo_wine expect(2, pt.x);
expect(2, pt.x);
/* offset by header height */
expect(rect.bottom - rect.top, pt.y);
......
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