Nikolay Sivov : comctl32/treeview: Correctly draw cut items.

Alexandre Julliard julliard at winehq.org
Mon May 23 13:24:57 CDT 2011


Module: wine
Branch: master
Commit: 9bdd21cad579de484b4aff56e8cf244495ea69aa
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=9bdd21cad579de484b4aff56e8cf244495ea69aa

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Sun May 22 11:29:51 2011 +0400

comctl32/treeview: Correctly draw cut items.

---

 dlls/comctl32/treeview.c |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/dlls/comctl32/treeview.c b/dlls/comctl32/treeview.c
index de4edf5..2388d3c 100644
--- a/dlls/comctl32/treeview.c
+++ b/dlls/comctl32/treeview.c
@@ -33,7 +33,7 @@
  *
  *   missing styles: TVS_FULLROWSELECT, TVS_INFOTIP, TVS_RTLREADING,
  *
- *   missing item styles: TVIS_CUT, TVIS_EXPANDPARTIAL, TVIS_EX_FLAT,
+ *   missing item styles: TVIS_EXPANDPARTIAL, TVIS_EX_FLAT,
  *      TVIS_EX_DISABLED
  *
  *   Make the insertion mark look right.
@@ -2601,12 +2601,14 @@ TREEVIEW_DrawItem(const TREEVIEW_INFO *infoPtr, HDC hdc, TREEVIEW_ITEM *item)
 
 	if (infoPtr->himlNormal)
 	{
-	    int ovlIdx = item->state & TVIS_OVERLAYMASK;
+            UINT style = item->state & TVIS_CUT ? ILD_SELECTED : ILD_NORMAL;
 
-	    ImageList_Draw(infoPtr->himlNormal, imageIndex, hdc,
-			   item->imageOffset,
-			   centery - infoPtr->normalImageHeight / 2,
-			   ILD_NORMAL | ovlIdx);
+            style |= item->state & TVIS_OVERLAYMASK;
+
+            ImageList_DrawEx(infoPtr->himlNormal, imageIndex, hdc,
+                         item->imageOffset, centery - infoPtr->normalImageHeight / 2,
+                         0, 0, infoPtr->clrBk, item->state & TVIS_CUT ? GETBKCOLOR(infoPtr->clrBk) : CLR_DEFAULT,
+                         style);
 	}
     }
 




More information about the wine-cvs mailing list