X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e75491071dbefcada61175e3eb89ce4edf335983..617ec45690c340d059726a09ccfe4bab9a42d82e:/src/mac/spinbutt.cpp diff --git a/src/mac/spinbutt.cpp b/src/mac/spinbutt.cpp index d91374445a..5ec5e1b8a2 100644 --- a/src/mac/spinbutt.cpp +++ b/src/mac/spinbutt.cpp @@ -24,10 +24,8 @@ // wxWin macros // ---------------------------------------------------------------------------- -#if !USE_SHARED_LIBRARY IMPLEMENT_DYNAMIC_CLASS(wxSpinButton, wxControl) IMPLEMENT_DYNAMIC_CLASS(wxSpinEvent, wxScrollEvent); -#endif bool wxSpinButton::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name) @@ -126,4 +124,23 @@ void wxSpinButton::MacHandleControlClick( ControlHandle control , SInt16 control GetEventHandler()->ProcessEvent(event); } +// ---------------------------------------------------------------------------- +// size calculation +// ---------------------------------------------------------------------------- + +wxSize wxSpinButton::DoGetBestSize() +{ + if ( (GetWindowStyle() & wxSP_VERTICAL) != 0 ) + { + // vertical control + return wxSize(16, + 2*16); + } + else + { + // horizontal control + return wxSize(2*16, + 16); + } +}