X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/784d24084800d506ce740e58007152a334780c71..24aab8e81a8627802e4111d9c99a50ece8d0026e:/src/generic/renderg.cpp diff --git a/src/generic/renderg.cpp b/src/generic/renderg.cpp index 217cbbf19d..11c05ae4b3 100644 --- a/src/generic/renderg.cpp +++ b/src/generic/renderg.cpp @@ -24,18 +24,18 @@ #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" + #include "wx/module.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 @@ -78,10 +78,10 @@ public: const wxRect& rect, int flags = 0); - virtual void DrawCheckButton(wxWindow *win, - wxDC& dc, - const wxRect& rect, - int flags = 0); + virtual void DrawCheckBox(wxWindow *win, + wxDC& dc, + const wxRect& rect, + int flags = 0); virtual void DrawPushButton(wxWindow *win, wxDC& dc, @@ -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 @@ -402,10 +403,10 @@ wxRendererGeneric::DrawDropArrow(wxWindow *win, } void -wxRendererGeneric::DrawCheckButton(wxWindow *WXUNUSED(win), - wxDC& dc, - const wxRect& rect, - int flags) +wxRendererGeneric::DrawCheckBox(wxWindow *WXUNUSED(win), + wxDC& dc, + const wxRect& rect, + int flags) { dc.SetPen(*(flags & wxCONTROL_DISABLED ? wxGREY_PEN : wxBLACK_PEN)); dc.SetBrush( *wxTRANSPARENT_BRUSH );