Fixing compilation on Mac, and attempting to better calculate the bottom position for the toolbar. However, this is not completely fixed and needs more work.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41270 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Kevin Ollivier 2006-09-18 02:39:36 +00:00
parent 31a8bf3fbf
commit f418332658

View File

@ -345,11 +345,11 @@ void wxFrame::PositionToolBar()
GetSize( &cw , &ch ) ;
int statusX, statusY;
GetStatusBar()->GetClientSize(&statusX, &statusY);
if (GetStatusBar() && GetStatusBar()->IsShown())
{
int statusX, statusY;
GetStatusBar()->GetClientSize(&statusX, &statusY);
ch -= statusY;
}
@ -366,11 +366,14 @@ void wxFrame::PositionToolBar()
// have the original client size.
GetToolBar()->SetSize(tx , ty , tw, ch , wxSIZE_NO_ADJUSTMENTS );
}
else if (GetToolBar->GetWindowStyleFlag() & wxTB_BOTTOM)
else if (GetToolBar()->GetWindowStyleFlag() & wxTB_BOTTOM)
{
//FIXME: this positions the tool bar almost correctly, but still it doesn't work right yet,
//as 1) the space for the 'old' top toolbar is still taken up, and 2) the toolbar
//doesn't extend it's width to the width of the frame.
tx = 0;
ty = statusY - th;
GetToolBar->SetSize(tx, ty, cw, th, wxSIZE_NO_ADJUSTMENTS );
ty = ch - (th + statusY);
GetToolBar()->SetSize(tx, ty, cw, th, wxSIZE_NO_ADJUSTMENTS );
}
else
{