comctl32/listview: Fix calculating item height.
This commit is contained in:
parent
ead7c50b5d
commit
67eb9744d9
|
@ -2955,13 +2955,10 @@ static INT LISTVIEW_CalculateItemHeight(const LISTVIEW_INFO *infoPtr)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
nItemHeight = infoPtr->ntmHeight;
|
nItemHeight = infoPtr->ntmHeight;
|
||||||
if (infoPtr->uView == LV_VIEW_DETAILS && infoPtr->dwLvExStyle & LVS_EX_GRIDLINES)
|
|
||||||
nItemHeight++;
|
|
||||||
if (infoPtr->himlState)
|
if (infoPtr->himlState)
|
||||||
nItemHeight = max(nItemHeight, infoPtr->iconStateSize.cy);
|
nItemHeight = max(nItemHeight, infoPtr->iconStateSize.cy);
|
||||||
if (infoPtr->himlSmall)
|
if (infoPtr->himlSmall)
|
||||||
nItemHeight = max(nItemHeight, infoPtr->iconSize.cy);
|
nItemHeight = max(nItemHeight, infoPtr->iconSize.cy);
|
||||||
if (infoPtr->himlState || infoPtr->himlSmall)
|
|
||||||
nItemHeight += HEIGHT_PADDING;
|
nItemHeight += HEIGHT_PADDING;
|
||||||
if (infoPtr->nMeasureItemHeight > 0)
|
if (infoPtr->nMeasureItemHeight > 0)
|
||||||
nItemHeight = infoPtr->nMeasureItemHeight;
|
nItemHeight = infoPtr->nMeasureItemHeight;
|
||||||
|
|
|
@ -2432,7 +2432,6 @@ static void test_subitem_rect(void)
|
||||||
|
|
||||||
expect(100, rect.left);
|
expect(100, rect.left);
|
||||||
expect(250, rect.right);
|
expect(250, rect.right);
|
||||||
todo_wine
|
|
||||||
expect(3, rect.top);
|
expect(3, rect.top);
|
||||||
|
|
||||||
rect.left = LVIR_BOUNDS;
|
rect.left = LVIR_BOUNDS;
|
||||||
|
@ -2443,7 +2442,6 @@ todo_wine
|
||||||
|
|
||||||
expect(250, rect.left);
|
expect(250, rect.left);
|
||||||
expect(450, rect.right);
|
expect(450, rect.right);
|
||||||
todo_wine
|
|
||||||
expect(3, rect.top);
|
expect(3, rect.top);
|
||||||
|
|
||||||
/* item LVS_REPORT padding isn't applied to subitems */
|
/* item LVS_REPORT padding isn't applied to subitems */
|
||||||
|
|
Loading…
Reference in New Issue