X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/eb7f24c1b54564d27e2a8b15526bdda91859495f..824fd93d761e1e697be19a4ca582c5259e12c8ea:/src/generic/treectlg.cpp diff --git a/src/generic/treectlg.cpp b/src/generic/treectlg.cpp index dd4fdecff9..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)); @@ -2884,8 +2893,6 @@ void wxGenericTreeCtrl::Edit( const wxTreeItemId& item ) return; } - m_itemEdited = itemEdit; - // We have to call this here because the label in // question might just have been added and no screen // update taken place. @@ -3478,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