From 25f347892e05da184d871ab23f1cb81a7869fa32 Mon Sep 17 00:00:00 2001 From: Piotr Caban Date: Thu, 10 May 2012 11:01:46 +0200 Subject: [PATCH] comctl32: Make icons not overlapping in LVS_ICON mode. --- dlls/comctl32/listview.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c index e50784820d2..7111560445a 100644 --- a/dlls/comctl32/listview.c +++ b/dlls/comctl32/listview.c @@ -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) -- 2.11.4.GIT