X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e75491071dbefcada61175e3eb89ce4edf335983..f5ba273ecd799f652736ce2bc830283787302a56:/src/mac/button.cpp diff --git a/src/mac/button.cpp b/src/mac/button.cpp index 1f42bad606..4635492a17 100644 --- a/src/mac/button.cpp +++ b/src/mac/button.cpp @@ -15,9 +15,7 @@ #include "wx/button.h" -#if !USE_SHARED_LIBRARY IMPLEMENT_DYNAMIC_CLASS(wxButton, wxControl) -#endif #include // Button @@ -66,6 +64,22 @@ void wxButton::SetDefault() } } +wxSize wxButton::DoGetBestSize() const +{ + int wBtn = m_label.Length() * 8 + 12 + 2 * m_macHorizontalBorder; + int hBtn = 13 + 2 * m_macVerticalBorder; + + return wxSize(wBtn, hBtn); +} + +wxSize wxButton::GetDefaultSize() +{ + int wBtn = 15 * 8 + 12 + 2 * 2; + int hBtn = 13 + 2 * 2; + + return wxSize(wBtn, hBtn); +} + void wxButton::Command (wxCommandEvent & event) { ProcessCommand (event);