Piotr Caban : comctl32: Make icons not overlapping in LVS_ICON mode.
Alexandre Julliard
julliard at winehq.org
Thu May 10 14:17:58 CDT 2012
Module: wine
Branch: master
Commit: 25f347892e05da184d871ab23f1cb81a7869fa32
URL: http://source.winehq.org/git/wine.git/?a=commit;h=25f347892e05da184d871ab23f1cb81a7869fa32
Author: Piotr Caban <piotr at codeweavers.com>
Date: Thu May 10 11:01:46 2012 +0200
comctl32: Make icons not overlapping in LVS_ICON mode.
---
dlls/comctl32/listview.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c
index e507848..7111560 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)
More information about the wine-cvs
mailing list