]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/renderg.cpp
add @DATE@, @TIME@ and @TITLE@ macros to HTML printing (extended/modified patch 1528679)
[wxWidgets.git] / src / generic / renderg.cpp
index 478d156dcfce0fa352197411665b759abc0ff6e0..138321f6bfb3fbdcb52bd7f825b8bb34dd9e83d0 100644 (file)
     #pragma hdrstop
 #endif
 
+#include "wx/renderer.h"
+
 #ifndef WX_PRECOMP
     #include "wx/string.h"
+    #include "wx/dc.h"
+    #include "wx/settings.h"
+    #include "wx/gdicmn.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 +230,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