X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/427ff66291af2d8dd34ff5ee68c81436997144a1..407f0db0504c39e022c063d64c03e2ff2117d5b3:/src/mac/button.cpp diff --git a/src/mac/button.cpp b/src/mac/button.cpp index 49c0586734..cc3685a17d 100644 --- a/src/mac/button.cpp +++ b/src/mac/button.cpp @@ -25,8 +25,8 @@ 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 ; bool wxButton::Create(wxWindow *parent, wxWindowID id, const wxString& label, const wxPoint& pos, @@ -34,6 +34,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 ; @@ -84,7 +87,7 @@ wxSize wxButton::DoGetBestSize() const { wxSize sz = GetDefaultSize() ; - int wBtn = m_label.Length() * 8 + 12 + 2 * kMacOSXHorizontalBorder ; + int wBtn = m_label.Length() * 10 + 12 + 2 * kMacOSXHorizontalBorder ; if (wBtn > sz.x) sz.x = wBtn; @@ -117,7 +120,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 ) {