No need to go through the heavy duty rect computation when in OWNERDRAW.
This commit is contained in:
parent
a625dd394d
commit
bbf878ded6
|
@ -1341,6 +1341,7 @@ static BOOL LISTVIEW_GetItemMeasures(LISTVIEW_INFO *infoPtr, INT nItem,
|
|||
else doLabel = TRUE;
|
||||
}
|
||||
if (uView == LVS_ICON && infoPtr->bFocus &&
|
||||
!(infoPtr->dwStyle & LVS_OWNERDRAWFIXED) &&
|
||||
LISTVIEW_GetItemState(infoPtr, nItem, LVIS_FOCUSED))
|
||||
oversizedBox = doLabel = TRUE;
|
||||
if (lprcLabel) doLabel = TRUE;
|
||||
|
@ -1412,7 +1413,12 @@ static BOOL LISTVIEW_GetItemMeasures(LISTVIEW_INFO *infoPtr, INT nItem,
|
|||
{
|
||||
SIZE labelSize = { 0, 0 };
|
||||
|
||||
if (is_textT(lvItem.pszText, TRUE))
|
||||
if (infoPtr->dwStyle & LVS_OWNERDRAWFIXED)
|
||||
{
|
||||
labelSize.cx = infoPtr->nItemWidth;
|
||||
labelSize.cy = infoPtr->nItemHeight;
|
||||
}
|
||||
else if (is_textT(lvItem.pszText, TRUE))
|
||||
{
|
||||
HFONT hFont = infoPtr->hFont ? infoPtr->hFont : infoPtr->hDefaultFont;
|
||||
HDC hdc = GetDC(infoPtr->hwndSelf);
|
||||
|
@ -1450,7 +1456,10 @@ static BOOL LISTVIEW_GetItemMeasures(LISTVIEW_INFO *infoPtr, INT nItem,
|
|||
Label.top = Box.top + ICON_TOP_PADDING_HITABLE +
|
||||
infoPtr->iconSize.cy + ICON_BOTTOM_PADDING;
|
||||
Label.right = Label.left + labelSize.cx;
|
||||
Label.bottom = Label.top + labelSize.cy + HEIGHT_PADDING;
|
||||
if (infoPtr->dwStyle & LVS_OWNERDRAWFIXED)
|
||||
Label.bottom = Label.top + infoPtr->nItemHeight;
|
||||
else
|
||||
Label.bottom = Label.top + labelSize.cy + HEIGHT_PADDING;
|
||||
}
|
||||
else /* LVS_SMALLICON, LVS_LIST or LVS_REPORT */
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue