]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/renderg.cpp
correct painting of the items with custom colours in TVIS_DROPHILITED state (patch...
[wxWidgets.git] / src / generic / renderg.cpp
index 478d156dcfce0fa352197411665b759abc0ff6e0..817dd01986f07abee00454b65e18b46ea1511f22 100644 (file)
     #pragma hdrstop
 #endif
 
+#include "wx/renderer.h"
+
 #ifndef WX_PRECOMP
     #include "wx/string.h"
+    #include "wx/dc.h"
+    #include "wx/settings.h"
 #endif //WX_PRECOMP
 
 #include "wx/gdicmn.h"
-#include "wx/dc.h"
 
-#include "wx/settings.h"
 #include "wx/splitter.h"
 #include "wx/dcmirror.h"
 #include "wx/module.h"
-#include "wx/renderer.h"
 
 // ----------------------------------------------------------------------------
 // wxRendererGeneric: our wxRendererNative implementation
@@ -230,9 +231,10 @@ wxRendererGeneric::DrawTreeItemButton(wxWindow * WXUNUSED(win),
                                       const wxRect& rect,
                                       int flags)
 {
-    // white background
-    dc.SetPen(*wxGREY_PEN);
-    dc.SetBrush(*wxWHITE_BRUSH);
+    // store settings
+    wxDCPenChanger penChanger(dc, *wxGREY_PEN);
+    wxDCBrushChanger brushChanger(dc, *wxWHITE_BRUSH);
+
     dc.DrawRectangle(rect);
 
     // black lines