The implementation of DrawHeaderButton() in MyRenderer should restore the
text foreground colour and brush to avoid messing up drawing done after it.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62289
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
wxHeaderSortIconType WXUNUSED(sortArrow) = wxHDR_SORT_ICON_NONE,
wxHeaderButtonParams* WXUNUSED(params) = NULL)
{
- dc.SetBrush(*wxBLUE_BRUSH);
- dc.SetTextForeground(*wxWHITE);
+ wxDCBrushChanger setBrush(dc, *wxBLUE_BRUSH);
+ wxDCTextColourChanger setFgCol(dc, *wxWHITE);
dc.DrawRoundedRectangle(rect, 5);
dc.DrawLabel(wxT("MyRenderer"), wxNullBitmap, rect, wxALIGN_CENTER);
return rect.width;