Commit f28afa10 authored by Maxime Bellengé's avatar Maxime Bellengé Committed by Alexandre Julliard

Correctly displays the text with ellipsis when there is not enough

room in a header item and an image from an imagelist is displayed on the right of the text.
parent df681b92
......@@ -324,9 +324,19 @@ HEADER_DrawItem (HWND hwnd, HDC hdc, INT iItem, BOOL bHotTrack)
}
else
tx = 0;
if (tx < (r.right-r.left - infoPtr->himl->cx - GetSystemMetrics(SM_CXEDGE)))
ImageList_DrawEx(infoPtr->himl, phdi->iImage, hdc, r.left + tx + 2*infoPtr->iMargin,
r.top + (r.bottom-r.top-infoPtr->himl->cy)/2, infoPtr->himl->cx, r.bottom-r.top,
CLR_DEFAULT, CLR_DEFAULT, 0);
else {
INT x = max(r.right - infoPtr->iMargin - infoPtr->himl->cx, r.left);
INT cx = min(infoPtr->himl->cx, r.right-r.left - GetSystemMetrics(SM_CXEDGE));
ImageList_DrawEx(infoPtr->himl, phdi->iImage, hdc, x ,
r.top + (r.bottom-r.top-infoPtr->himl->cy)/2, cx, r.bottom-r.top,
CLR_DEFAULT, CLR_DEFAULT, 0);
r.right -= infoPtr->himl->cx - infoPtr->iMargin;
}
}
if (((phdi->fmt & HDF_STRING)
......
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