make sure we are feeding coordinates of HIView instances, not wx-dimensions back into toolbar layout

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40909 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor 2006-08-29 12:16:47 +00:00
parent c2b2c10ed6
commit da14a87dee

View File

@ -649,6 +649,8 @@ static pascal OSStatus ControlToolbarItemHandler( EventHandlerCallRef inCallRef,
if ( wxwindow )
{
wxSize sz = wxwindow->GetSize() ;
sz.x -= wxwindow->MacGetLeftBorderSize() + wxwindow->MacGetRightBorderSize();
sz.y -= wxwindow->MacGetTopBorderSize() + wxwindow->MacGetBottomBorderSize();
// during toolbar layout the native window sometimes gets negative sizes
// so we always keep the last valid size here, to make sure we survive the
// shuffle ...