]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/button.cpp
Fixed incorrect clipping region on wxGTK
[wxWidgets.git] / src / mac / carbon / button.cpp
index f280182a1100c0faa5d6aedb1ab5dc09fa0f746a..28b8697630fa1bdbf25d6fd19c2080bd4e2d706d 100644 (file)
@@ -17,6 +17,7 @@
 
 #include "wx/button.h"
 #include "wx/panel.h"
+#include "wx/stockitem.h"
 
 #if !USE_SHARED_LIBRARY
 IMPLEMENT_DYNAMIC_CLASS(wxButton, wxControl)
@@ -25,12 +26,16 @@ IMPLEMENT_DYNAMIC_CLASS(wxButton, wxControl)
 #include "wx/mac/uma.h"
 // Button
 
-bool wxButton::Create(wxWindow *parent, wxWindowID id, const wxString& label,
+bool wxButton::Create(wxWindow *parent, wxWindowID id, const wxString& lbl,
            const wxPoint& pos,
            const wxSize& size, long style,
            const wxValidator& validator,
            const wxString& name)
 {
+    wxString label(lbl);
+    if (label.empty() && wxIsStockID(id))
+        label = wxGetStockLabel(id);
+    
     m_macIsUserPane = FALSE ;
     
     if ( !wxButtonBase::Create(parent, id, pos, size, style, validator, name) )