]> git.saurik.com Git - wxWidgets.git/commitdiff
Don't draw the primary highlight colors if the control doesn't have the focus.
authorKevin Ollivier <kevino@theolliviers.com>
Sat, 6 Jan 2007 01:53:52 +0000 (01:53 +0000)
committerKevin Ollivier <kevino@theolliviers.com>
Sat, 6 Jan 2007 01:53:52 +0000 (01:53 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44101 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mac/carbon/listctrl_mac.cpp

index b614cf38773ff450f10165538fd459bff18b0f5d..138b90fd53dce7587e3675eeb9ccdea3126d6b97 100644 (file)
@@ -2638,6 +2638,7 @@ void wxMacDataBrowserListCtrlControl::DrawItem(
                       enclosingRect.right - enclosingRect.left,
                       enclosingRect.bottom - enclosingRect.top);
 
+    bool hasFocus = (wxWindow::FindFocus() == list);
     active = IsControlActive(GetControlRef());
 
     // don't paint the background over the vertical rule line
@@ -2651,7 +2652,7 @@ void wxMacDataBrowserListCtrlControl::DrawItem(
 
         GetThemeDrawingState(&savedState);
         
-        if (active)
+        if (active && hasFocus)
         {
             GetThemeBrushAsColor(kThemeBrushAlternatePrimaryHighlightColor, 32, true, &backgroundColor);
             GetThemeTextColor(kThemeTextColorWhite, gdDepth, colorDevice, &labelColor);