X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e75491071dbefcada61175e3eb89ce4edf335983..b81abd0d1d0fcde8db54f8c5e736b2b9daaf2ea0:/src/mac/spinbutt.cpp diff --git a/src/mac/spinbutt.cpp b/src/mac/spinbutt.cpp index d91374445a..f5ac7bc9bb 100644 --- a/src/mac/spinbutt.cpp +++ b/src/mac/spinbutt.cpp @@ -126,4 +126,23 @@ void wxSpinButton::MacHandleControlClick( ControlHandle control , SInt16 control GetEventHandler()->ProcessEvent(event); } +// ---------------------------------------------------------------------------- +// size calculation +// ---------------------------------------------------------------------------- + +wxSize wxSpinButton::DoGetBestSize() const +{ + if ( (GetWindowStyle() & wxSP_VERTICAL) != 0 ) + { + // vertical control + return wxSize(16, + 2*16); + } + else + { + // horizontal control + return wxSize(2*16, + 16); + } +}