comctl32/listview: Fix subitem drawing

Daniel Jelinski djelinski1 at gmail.com
Sat Jan 5 15:59:03 CST 2013


-------------- next part --------------
From 1538982a1be1c511a1de197d9537ca2a5157b0c8 Mon Sep 17 00:00:00 2001
From: Daniel Jelinski <djelinski1 at gmail.com>
Date: Sat, 5 Jan 2013 22:46:12 +0100
Subject: comctl32/listview: Fix subitem drawing

lpColumnInfo->fmt & LVCFMT_IMAGE is supposed to mean that header item has
an image. It is not supposed to mean that all items in that column
should reserve space for an icon if they don't have any.

Header images are not supported yet.
---
 dlls/comctl32/listview.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c
index 977bb18..67937dd 100644
--- a/dlls/comctl32/listview.c
+++ b/dlls/comctl32/listview.c
@@ -2363,7 +2363,7 @@ static void LISTVIEW_GetItemMetrics(const LISTVIEW_INFO *infoPtr, const LVITEMW
 	    Icon.top    = Box.top;
 	    Icon.right  = Icon.left;
 	    if (infoPtr->himlSmall &&
-                (!lpColumnInfo || lpLVItem->iSubItem == 0 || (lpColumnInfo->fmt & LVCFMT_IMAGE) ||
+                (!lpColumnInfo || lpLVItem->iSubItem == 0 ||
                  ((infoPtr->dwLvExStyle & LVS_EX_SUBITEMIMAGES) && lpLVItem->iImage != I_IMAGECALLBACK)))
 		Icon.right += infoPtr->iconSize.cx;
 	    Icon.bottom = Icon.top + infoPtr->iconSize.cy;
-- 
1.7.5.4


More information about the wine-patches mailing list