X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/94d1d0f447efe45e25520d2352a4fe13c1837608..544bdbbee2c81c8ab3a69e100bbd441b6461d609:/src/mac/carbon/frame.cpp diff --git a/src/mac/carbon/frame.cpp b/src/mac/carbon/frame.cpp index 9bb8cb9357..d7cc70101e 100644 --- a/src/mac/carbon/frame.cpp +++ b/src/mac/carbon/frame.cpp @@ -9,10 +9,12 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma implementation "frame.h" #endif +#include "wx/wxprec.h" + #include "wx/frame.h" #include "wx/statusbr.h" #include "wx/toolbar.h" @@ -40,7 +42,7 @@ END_EVENT_TABLE() IMPLEMENT_DYNAMIC_CLASS(wxFrame, wxTopLevelWindow) #endif -#define WX_MAC_STATUSBAR_HEIGHT 15 +#define WX_MAC_STATUSBAR_HEIGHT 18 // ---------------------------------------------------------------------------- // creation/destruction // ---------------------------------------------------------------------------- @@ -110,23 +112,21 @@ wxStatusBar *wxFrame::OnCreateStatusBar(int number, long style, wxWindowID id, statusBar = new wxStatusBar(this, id, style, name); - statusBar->SetSize( 100 , 15 ) ; + statusBar->SetSize( 100 , WX_MAC_STATUSBAR_HEIGHT ) ; statusBar->SetFieldsCount(number); return statusBar; } void wxFrame::PositionStatusBar() { - if (m_frameStatusBar ) + if (m_frameStatusBar && m_frameStatusBar->IsShown() ) { int w, h; GetClientSize(&w, &h); - int sw, sh; - m_frameStatusBar->GetSize(&sw, &sh); // Since we wish the status bar to be directly under the client area, // we use the adjusted sizes without using wxSIZE_NO_ADJUSTMENTS. - m_frameStatusBar->SetSize(0, h, w, sh); + m_frameStatusBar->SetSize(0, h, w, WX_MAC_STATUSBAR_HEIGHT); } } @@ -226,11 +226,9 @@ void wxFrame::DoGetClientSize(int *x, int *y) const wxTopLevelWindow::DoGetClientSize( x , y ) ; #if wxUSE_STATUSBAR - if ( GetStatusBar() && y ) + if ( GetStatusBar() && GetStatusBar()->IsShown() && y ) { - int statusX, statusY; - GetStatusBar()->GetSize(&statusX, &statusY); - if ( y) *y -= statusY; + if ( y) *y -= WX_MAC_STATUSBAR_HEIGHT; } #endif // wxUSE_STATUSBAR @@ -293,7 +291,7 @@ void wxFrame::PositionToolBar() GetSize( &cw , &ch ) ; - if ( GetStatusBar() ) + if ( GetStatusBar() && GetStatusBar()->IsShown()) { int statusX, statusY; GetStatusBar()->GetClientSize(&statusX, &statusY);