Mac build fixes after latest change (closes #10433)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58414 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -432,24 +432,24 @@ wxTreeTextCtrl::wxTreeTextCtrl(wxGenericTreeCtrl *owner,
|
|||||||
wxRect rect;
|
wxRect rect;
|
||||||
m_owner->GetBoundingRect(m_itemEdited, rect, true);
|
m_owner->GetBoundingRect(m_itemEdited, rect, true);
|
||||||
|
|
||||||
// corrects possition and size for better apperance
|
// corrects position and size for better appearance
|
||||||
#ifdef __WXMSW__
|
#ifdef __WXMSW__
|
||||||
rect.x -= 5;
|
rect.x -= 5;
|
||||||
rect.width += 10;
|
rect.width += 10;
|
||||||
#elif __WXGTK__
|
#elif defined(__WXGTK__)
|
||||||
rect.x -= 5;
|
rect.x -= 5;
|
||||||
rect.y -= 2;
|
rect.y -= 2;
|
||||||
rect.width += 8;
|
rect.width += 8;
|
||||||
rect.height += 4;
|
rect.height += 4;
|
||||||
#elif __WXMAC__
|
#elif defined(__WXMAC__)
|
||||||
wxSize bs = DoGetBestSize();
|
int bestHeight = GetBestSize().y - 8;
|
||||||
// edit control height
|
if ( rect.height > bestHeight )
|
||||||
if ( rect.height > bs.y - 8 )
|
{
|
||||||
int diff = rect.height - ( bs.y - 8 );
|
int diff = rect.height - bestHeight;
|
||||||
rect.height -= diff;
|
rect.height -= diff;
|
||||||
rect.y += diff / 2;
|
rect.y += diff / 2;
|
||||||
}
|
}
|
||||||
#endif
|
#endif // platforms
|
||||||
|
|
||||||
(void)Create(m_owner, wxID_ANY, m_startValue,
|
(void)Create(m_owner, wxID_ANY, m_startValue,
|
||||||
rect.GetPosition(), rect.GetSize());
|
rect.GetPosition(), rect.GetSize());
|
||||||
|
|||||||
Reference in New Issue
Block a user