]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/button.cpp
bump subrelease number
[wxWidgets.git] / src / msw / button.cpp
index 05c20f9b8853ca86a02636de853515d965489cf6..13f270d4c57f7b8a603ead2f0567774a5e97d09a 100644 (file)
@@ -849,11 +849,10 @@ bool wxButton::MSWOnDraw(WXDRAWITEMSTRUCT *wxdis)
     }
 
     COLORREF colFg = wxColourToRGB(GetForegroundColour());
     }
 
     COLORREF colFg = wxColourToRGB(GetForegroundColour());
-    DrawButtonText(hdc, &rectBtn,
-                   state & ODS_NOACCEL ? GetLabelText()
-                                       : GetLabel(),
-                   state & ODS_DISABLED ? GetSysColor(COLOR_GRAYTEXT)
-                                        : colFg);
+    if ( state & ODS_DISABLED ) colFg = GetSysColor(COLOR_GRAYTEXT) ;
+    wxString label = GetLabel();
+    if ( state & ODS_NOACCEL ) label = GetLabelText() ;
+    DrawButtonText(hdc, &rectBtn, label, colFg);
 
     return true;
 }
 
     return true;
 }