X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/facd6764872eede45605ba7c9dfa0e1d0c708fa2..f4e8ff28c5ad0c498ee676a3470e615b6479ba3b:/src/mac/carbon/tabctrl.cpp diff --git a/src/mac/carbon/tabctrl.cpp b/src/mac/carbon/tabctrl.cpp index ab984484fd..677dd1ae91 100644 --- a/src/mac/carbon/tabctrl.cpp +++ b/src/mac/carbon/tabctrl.cpp @@ -43,9 +43,24 @@ bool wxTabCtrl::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, cons m_imageList = NULL; Rect bounds = wxMacGetBoundsForControl( this , pos , size ) ; - m_macControl = (WXWidget) ::NewControl( MAC_WXHWND(parent->MacGetTopLevelWindowRef()) , &bounds , "\p" , true , 0 , 0 , 1, - kControlTabSmallProc , (long) this ) ; + + UInt16 tabstyle = kControlTabDirectionNorth ; + ControlTabSize tabsize = kControlTabSizeLarge ; + if ( GetWindowVariant() == wxWINDOW_VARIANT_SMALL ) + tabsize = kControlTabSizeSmall ; + else if ( GetWindowVariant() == wxWINDOW_VARIANT_MINI ) + { + if (UMAGetSystemVersion() >= 0x1030 ) + tabsize = 3 ; + else + tabsize = kControlSizeSmall; + } + + m_peer = new wxMacControl() ; + verify_noerr ( CreateTabsControl( MAC_WXHWND(parent->MacGetTopLevelWindowRef()) , &bounds , + tabsize , tabstyle, 0, NULL, *m_peer ) ); + MacPostControlCreate(pos,size) ; return TRUE ; }