X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e40298d54ecd5b109222a7c60aa2ef084a304d69..b77b87881bae2e6306366d79e7fe160334b3d4a2:/src/mac/button.cpp diff --git a/src/mac/button.cpp b/src/mac/button.cpp index 763048808e..52bd329993 100644 --- a/src/mac/button.cpp +++ b/src/mac/button.cpp @@ -25,8 +25,12 @@ IMPLEMENT_DYNAMIC_CLASS(wxButton, wxControl) #include "wx/mac/uma.h" // Button -static const int kMacOSXHorizontalBorder = 1 ; -static const int kMacOSXVerticalBorder = 1 ; +static const int kMacOSXHorizontalBorder = 2 ; +static const int kMacOSXVerticalBorder = 4 ; + +wxButtonBase::wxButtonBase() +{ +} bool wxButton::Create(wxWindow *parent, wxWindowID id, const wxString& label, const wxPoint& pos, @@ -34,6 +38,9 @@ bool wxButton::Create(wxWindow *parent, wxWindowID id, const wxString& label, const wxValidator& validator, const wxString& name) { + if ( !wxButtonBase::Create(parent, id, pos, size, style, validator, name) ) + return false; + Rect bounds ; Str255 title ; @@ -47,7 +54,7 @@ bool wxButton::Create(wxWindow *parent, wxWindowID id, const wxString& label, m_macControl = ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , title , false , 0 , 0 , 1, kControlPushButtonProc , (long) this ) ; - wxASSERT_MSG( (ControlHandle) m_macControl != NULL , "No valid mac control" ) ; + wxASSERT_MSG( (ControlHandle) m_macControl != NULL , wxT("No valid mac control") ) ; MacPostControlCreate() ; @@ -117,7 +124,7 @@ void wxButton::Command (wxCommandEvent & event) ProcessCommand (event); } -void wxButton::MacHandleControlClick( WXWidget WXUNUSED(control) , wxInt16 controlpart ) +void wxButton::MacHandleControlClick( WXWidget WXUNUSED(control) , wxInt16 controlpart , bool WXUNUSED(mouseStillDown) ) { if ( controlpart != kControlNoPart ) {