From: Kevin Ollivier Date: Mon, 18 Sep 2006 02:39:36 +0000 (+0000) Subject: Fixing compilation on Mac, and attempting to better calculate the bottom position... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/f418332658bb166101c228e0ed8208787fccbf59 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 --- diff --git a/src/mac/carbon/frame.cpp b/src/mac/carbon/frame.cpp index b327bfa9bf..47d8fd32cb 100644 --- a/src/mac/carbon/frame.cpp +++ b/src/mac/carbon/frame.cpp @@ -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 {