comctl32: Make icons not overlapping in LVS_ICON mode.

oldstable
Piotr Caban 2012-05-10 11:01:46 +02:00 committed by Alexandre Julliard
parent 8276a3375b
commit 25f347892e
1 changed files with 6 additions and 4 deletions

View File

@ -8564,10 +8564,12 @@ static DWORD LISTVIEW_SetIconSpacing(LISTVIEW_INFO *infoPtr, INT cx, INT cy)
if (cy == -1) cy = GetSystemMetrics(SM_CYICONSPACING);
/* if 0 then compute width
* FIXME: Should scan each item and determine max width of
* icon or label, then make that the width */
if (cx == 0)
cx = infoPtr->iconSpacing.cx;
* FIXME: computed cx and cy is not matching native behaviour */
if (cx == 0) {
cx = GetSystemMetrics(SM_CXICONSPACING);
if (infoPtr->iconSize.cx + ICON_LR_PADDING > cx)
cx = infoPtr->iconSize.cx + ICON_LR_PADDING;
}
/* if 0 then compute height */
if (cy == 0)