]> git.saurik.com Git - wxWidgets.git/commitdiff
use item colour when drawing the focused item if we don't highlight it
authorVadim Zeitlin <vadim@wxwidgets.org>
Mon, 6 Aug 2001 19:49:37 +0000 (19:49 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Mon, 6 Aug 2001 19:49:37 +0000 (19:49 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11308 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/generic/treectlg.cpp

index 0b9e91d4e2935176ca4973c7230c912b8db2dc8e..ed745c827f1f28c55daf7d37f6d383ace3dc6997 100644 (file)
@@ -1916,23 +1916,20 @@ void wxGenericTreeCtrl::PaintLevel( wxGenericTreeItem *item, wxDC &dc, int level
             }
         }
 
-        wxPen *pen = wxTRANSPARENT_PEN;
-        wxColour colText;
-
+        wxPen *pen;
+#ifndef __WXMAC__
+        // don't draw rect outline if we already have the background color
+        // under Max
         if ( item->IsSelected() )
-        {
             pen = wxBLACK_PEN;
-
-            if ( m_hasFocus )
-            {
-                colText = wxSystemSettings::
-                            GetSystemColour( wxSYS_COLOUR_HIGHLIGHTTEXT );
-            }
-
-#ifdef __WXMAC__
-            // no rect outline, we already have the background color
+        else
+#endif // !__WXMAC__
             pen = wxTRANSPARENT_PEN;
-#endif
+
+        wxColour colText;
+        if ( item->IsSelected() && m_hasFocus )
+        {
+            colText = wxSystemSettings::GetSystemColour( wxSYS_COLOUR_HIGHLIGHTTEXT );
         }
         else
         {