Don't change the current pen and brush in DrawHeaderButtonContents().

Renderer methods shouldn't affect the functions drawing on the DC after it but
the wxRendererGeneric implementation did.

Use wxDC{Pen,Brush}Changer classes instead of calling wxDC::Set{Pen,Brush}()
directly.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64308 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2010-05-15 11:15:05 +00:00
parent 945178c70e
commit 78010a1f33

View File

@@ -324,8 +324,10 @@ wxRendererGeneric::DrawHeaderButtonContents(wxWindow *win,
wxColour c = (params && params->m_arrowColour.Ok()) ?
params->m_arrowColour : wxSystemSettings::GetColour(wxSYS_COLOUR_3DSHADOW);
dc.SetPen(wxPen(c));
dc.SetBrush(wxBrush(c));
wxDCPenChanger setPen(dc, c);
wxDCBrushChanger setBrush(dc, c);
dc.DrawPolygon( 3, triPt, ar.x, ar.y);
}
labelWidth += arrowSpace;