]> git.saurik.com Git - wxWidgets.git/commitdiff
preserve pen in DrawCheckMark() (bug 1581621)
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 5 Nov 2006 00:51:08 +0000 (00:51 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 5 Nov 2006 00:51:08 +0000 (00:51 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43081 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/dcbase.cpp

index 08d7d49e2b6ee9243c9b830101e2021aa8b296c5..52359ee58681d58fe6f09533f5a67f39e41892ea 100644 (file)
@@ -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