[ros-diffs] [rharabien] 55586: [COMCTL32] - Draw shadow if item has focus but isn't selected

rharabien at svn.reactos.org rharabien at svn.reactos.org
Tue Feb 14 00:58:59 UTC 2012


Author: rharabien
Date: Tue Feb 14 00:58:59 2012
New Revision: 55586

URL: http://svn.reactos.org/svn/reactos?rev=55586&view=rev
Log:
[COMCTL32]
- Draw shadow if item has focus but isn't selected

Modified:
    trunk/reactos/dll/win32/comctl32/comctl32_ros.diff
    trunk/reactos/dll/win32/comctl32/listview.c

Modified: trunk/reactos/dll/win32/comctl32/comctl32_ros.diff
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/comctl32_ros.diff?rev=55586&r1=55585&r2=55586&view=diff
==============================================================================
--- trunk/reactos/dll/win32/comctl32/comctl32_ros.diff [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/comctl32/comctl32_ros.diff [iso-8859-1] Tue Feb 14 00:58:59 2012
@@ -296,7 +296,19 @@
  }
  
  /* Listview invalidation functions: use _only_ these functions to invalidate */
-@@ -5117,7 +5129,11 @@
+@@ -4698,7 +4710,10 @@
+     if (infoPtr->uView == LV_VIEW_DETAILS && infoPtr->dwLvExStyle & LVS_EX_GRIDLINES)
+         rcLabel.bottom--;
+ 
+-    DrawTextW(hdc, lvItem.pszText, -1, &rcLabel, uFormat);
++    if ((!(lvItem.state & LVIS_SELECTED) || !infoPtr->bFocus) && (infoPtr->dwLvExStyle & LVS_EX_TRANSPARENTSHADOWTEXT))
++        DrawShadowText(hdc, lvItem.pszText, -1, &rcLabel, uFormat, RGB(255, 255, 255), RGB(0, 0, 0), 2, 2);
++    else
++        DrawTextW(hdc, lvItem.pszText, -1, &rcLabel, uFormat);
+ 
+ postpaint:
+     if (cdsubitemmode & CDRF_NOTIFYPOSTPAINT)
+@@ -5117,7 +5132,11 @@
  
      /* Draw marquee rectangle if appropriate */
      if (infoPtr->bMarqueeSelect)
@@ -308,7 +320,7 @@
  
      if (cdmode & CDRF_NOTIFYPOSTPAINT)
  	notify_postpaint(infoPtr, &nmlvcd);
-@@ -7927,6 +7943,7 @@
+@@ -7927,6 +7946,7 @@
  {
      TRACE("(color=%x)\n", color);
  
@@ -316,7 +328,7 @@
      if(infoPtr->clrBk != color) {
  	if (infoPtr->clrBk != CLR_NONE) DeleteObject(infoPtr->hBkBrush);
  	infoPtr->clrBk = color;
-@@ -9314,6 +9331,7 @@
+@@ -9314,6 +9334,7 @@
    infoPtr->clrText = CLR_DEFAULT;
    infoPtr->clrTextBk = CLR_DEFAULT;
    LISTVIEW_SetBkColor(infoPtr, comctl32_color.clrWindow);
@@ -324,7 +336,7 @@
  
    /* set default values */
    infoPtr->nFocusedItem = -1;
-@@ -11570,6 +11588,12 @@
+@@ -11570,6 +11591,12 @@
  
    case WM_SYSCOLORCHANGE:
      COMCTL32_RefreshSysColors();

Modified: trunk/reactos/dll/win32/comctl32/listview.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/listview.c?rev=55586&r1=55585&r2=55586&view=diff
==============================================================================
--- trunk/reactos/dll/win32/comctl32/listview.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/comctl32/listview.c [iso-8859-1] Tue Feb 14 00:58:59 2012
@@ -4710,7 +4710,7 @@
     if (infoPtr->uView == LV_VIEW_DETAILS && infoPtr->dwLvExStyle & LVS_EX_GRIDLINES)
         rcLabel.bottom--;
 
-    if (!lprcFocus && (infoPtr->dwLvExStyle & LVS_EX_TRANSPARENTSHADOWTEXT))
+    if ((!(lvItem.state & LVIS_SELECTED) || !infoPtr->bFocus) && (infoPtr->dwLvExStyle & LVS_EX_TRANSPARENTSHADOWTEXT))
         DrawShadowText(hdc, lvItem.pszText, -1, &rcLabel, uFormat, RGB(255, 255, 255), RGB(0, 0, 0), 2, 2);
     else
         DrawTextW(hdc, lvItem.pszText, -1, &rcLabel, uFormat);




More information about the Ros-diffs mailing list