]> git.saurik.com Git - wxWidgets.git/blobdiff - src/univ/stdrend.cpp
compare charset strings case-insensitively (and so avoid conversions between utf...
[wxWidgets.git] / src / univ / stdrend.cpp
index 6d7040a705e6b190105c28a0f465cde50b6b95b2..ea50847d707876374cf75ea273e1387eb763d675 100644 (file)
@@ -257,6 +257,8 @@ void wxStdRenderer::DrawButtonLabel(wxDC& dc,
                                     int indexAccel,
                                     wxRect *rectBounds)
 {
+    wxDCTextColourChanger clrChanger(dc);
+
     wxRect rectLabel = rect;
     if ( !label.empty() && (flags & wxCONTROL_DISABLED) )
     {
@@ -267,13 +269,13 @@ void wxStdRenderer::DrawButtonLabel(wxDC& dc,
         }
 
         // draw shadow of the text
-        dc.SetTextForeground(m_penHighlight.GetColour());
+        clrChanger.Set(m_penHighlight.GetColour());
         wxRect rectShadow = rect;
         rectShadow.Offset(1, 1);
         dc.DrawLabel(label, rectShadow, alignment, indexAccel);
 
         // make the main label text grey
-        dc.SetTextForeground(m_penDarkGrey.GetColour());
+        clrChanger.Set(m_penDarkGrey.GetColour());
 
         if ( flags & wxCONTROL_FOCUSED )
         {