From: Stefan Csomor Date: Mon, 30 Aug 2004 07:07:26 +0000 (+0000) Subject: adapting textctrl position to window theme X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/6574f2b143d9f33ef1e8c3ee4f43e44b657ecbe4 adapting textctrl position to window theme git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28964 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/generic/treectlg.cpp b/src/generic/treectlg.cpp index 2065d971d1..b733643760 100644 --- a/src/generic/treectlg.cpp +++ b/src/generic/treectlg.cpp @@ -376,10 +376,11 @@ wxTreeTextCtrl::wxTreeTextCtrl(wxGenericTreeCtrl *owner, x += image_w; w -= image_w + 4; #ifdef __WXMAC__ + wxSize bs = DoGetBestSize() ; // edit control height - if ( h > 22 - 8 ) + if ( h > bs.y - 8 ) { - int diff = h - ( 22 - 8 ) ; + int diff = h - ( bs.y - 8 ) ; h -= diff ; y += diff / 2 ; }