From: Vadim Zeitlin Date: Sun, 5 Nov 2006 00:51:08 +0000 (+0000) Subject: preserve pen in DrawCheckMark() (bug 1581621) X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/860a4018b93fbc1edaaebfe241e71b3ff0ab4d0d?ds=sidebyside preserve pen in DrawCheckMark() (bug 1581621) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43081 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/common/dcbase.cpp b/src/common/dcbase.cpp index 08d7d49e2b..52359ee586 100644 --- a/src/common/dcbase.cpp +++ b/src/common/dcbase.cpp @@ -64,8 +64,9 @@ void wxDCBase::DoDrawCheckMark(wxCoord x1, wxCoord y1, wxCoord x2 = x1 + width, y2 = y1 + height; - // this is to yield width of 3 for width == height == 10 - SetPen(wxPen(GetTextForeground(), (width + height + 1) / 7, wxSOLID)); + // the pen width is calibrated to give 3 for width == height == 10 + wxDCPenChanger pen((wxDC&)*this, + wxPen(GetTextForeground(), (width + height + 1)/7)); // we're drawing a scaled version of wx/generic/tick.xpm here wxCoord x3 = x1 + (4*width) / 10, // x of the tick bottom