X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e75491071dbefcada61175e3eb89ce4edf335983..7b9da2077d0975db6c965a85c91d5aca671ab5e3:/src/mac/spinbutt.cpp diff --git a/src/mac/spinbutt.cpp b/src/mac/spinbutt.cpp index d91374445a..f48ad3de9e 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() +{ + if ( (GetWindowStyle() & wxSP_VERTICAL) != 0 ) + { + // vertical control + return wxSize(16, + 2*16); + } + else + { + // horizontal control + return wxSize(2*16, + 16); + } +}