comctl32/listview: Improve item position calculating in LVS_REPORT.
This commit is contained in:
parent
25c775a036
commit
2a32ce744c
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue