From 6574f2b143d9f33ef1e8c3ee4f43e44b657ecbe4 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Mon, 30 Aug 2004 07:07:26 +0000 Subject: [PATCH] adapting textctrl position to window theme git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28964 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/generic/treectlg.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 ; } -- 2.45.2