X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/09088d12d4d610bb45e4cb536384d6e51788b730..824fd93d761e1e697be19a4ca582c5259e12c8ea:/src/generic/treectlg.cpp diff --git a/src/generic/treectlg.cpp b/src/generic/treectlg.cpp index 61cfce6b52..2065d971d1 100644 --- a/src/generic/treectlg.cpp +++ b/src/generic/treectlg.cpp @@ -375,6 +375,15 @@ wxTreeTextCtrl::wxTreeTextCtrl(wxGenericTreeCtrl *owner, // FIXME: what are all these hardcoded 4, 8 and 11s really? x += image_w; w -= image_w + 4; +#ifdef __WXMAC__ + // edit control height + if ( h > 22 - 8 ) + { + int diff = h - ( 22 - 8 ) ; + h -= diff ; + y += diff / 2 ; + } +#endif (void)Create(m_owner, wxID_ANY, m_startValue, wxPoint(x - 4, y - 4), wxSize(w + 11, h + 8)); @@ -3476,6 +3485,15 @@ void wxGenericTreeCtrl::OnGetToolTip( wxTreeEvent &event ) } +wxSize wxGenericTreeCtrl::DoGetBestSize() const +{ + // something is better than nothing... + // 100x80 is what the MSW version will get from the default + // wxControl::DoGetBestSize + return wxSize(100,80); +} + + // NOTE: If using the wxListBox visual attributes works everywhere then this can // be removed, as well as the #else case below. #define _USE_VISATTR 0