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:
@@ -324,8 +324,10 @@ wxRendererGeneric::DrawHeaderButtonContents(wxWindow *win,
|
|||||||
|
|
||||||
wxColour c = (params && params->m_arrowColour.Ok()) ?
|
wxColour c = (params && params->m_arrowColour.Ok()) ?
|
||||||
params->m_arrowColour : wxSystemSettings::GetColour(wxSYS_COLOUR_3DSHADOW);
|
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);
|
dc.DrawPolygon( 3, triPt, ar.x, ar.y);
|
||||||
}
|
}
|
||||||
labelWidth += arrowSpace;
|
labelWidth += arrowSpace;
|
||||||
|
Reference in New Issue
Block a user