]> git.saurik.com Git - wxWidgets.git/commitdiff
fixed SetForegroundColour() for the generic tree ctrl
authorVadim Zeitlin <vadim@wxwidgets.org>
Wed, 20 Feb 2002 17:42:05 +0000 (17:42 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Wed, 20 Feb 2002 17:42:05 +0000 (17:42 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14329 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/generic/treectlg.cpp

index 89e0197b8bc47836cce9b69132c36e4baedf775c..833404dd9f71f8786c68238ddac93092aa551443 100644 (file)
@@ -741,9 +741,9 @@ bool wxGenericTreeCtrl::Create(wxWindow *parent,
     wxScrolledWindow::Create( parent, id, pos, size,
                               style|wxHSCROLL|wxVSCROLL, name );
 
-        // If the tree display has no buttons, but does have
-        // connecting lines, we can use a narrower layout.
-        // It may not be a good idea to force this...
+    // If the tree display has no buttons, but does have
+    // connecting lines, we can use a narrower layout.
+    // It may not be a good idea to force this...
     if (!HasButtons() && !HasFlag(wxTR_NO_LINES))
     {
         m_indent= 10;
@@ -754,7 +754,8 @@ bool wxGenericTreeCtrl::Create(wxWindow *parent,
     SetValidator( validator );
 #endif
 
-    SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_LISTBOX ) );
+    SetForegroundColour( wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT) );
+    SetBackgroundColour( wxSystemSettings::GetColour(wxSYS_COLOUR_LISTBOX) );
 
 //  m_dottedPen = wxPen( "grey", 0, wxDOT );  too slow under XFree86
     m_dottedPen = wxPen( wxT("grey"), 0, 0 );
@@ -2061,7 +2062,7 @@ void wxGenericTreeCtrl::PaintLevel( wxGenericTreeItem *item, wxDC &dc, int level
             if (attr && attr->HasTextColour())
                 colText = attr->GetTextColour();
             else
-                colText = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT);
+                colText = GetForegroundColour();
         }
 
         // prepare to draw