X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e75491071dbefcada61175e3eb89ce4edf335983..6ba636000f13b4bf7d3e7dcfad429713085f6700:/src/mac/spinbutt.cpp?ds=sidebyside 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); + } +}