X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ac17f7283f0f63d0c180750f3f365badac60d3ef..a67c2d41615427fefdbfdb773dda2d0317ba4bf9:/src/osx/carbon/frame.cpp diff --git a/src/osx/carbon/frame.cpp b/src/osx/carbon/frame.cpp index 87843156b5..92ee6a94f5 100644 --- a/src/osx/carbon/frame.cpp +++ b/src/osx/carbon/frame.cpp @@ -78,11 +78,11 @@ wxPoint wxFrame::GetClientAreaOrigin() const int w, h; toolbar->GetSize(&w, &h); - if ( toolbar->GetWindowStyleFlag() & wxTB_VERTICAL ) + if ( toolbar->HasFlag(wxTB_LEFT) ) { pt.x += w; } - else + else if ( HasFlag(wxTB_TOP) ) { #if !wxOSX_USE_NATIVE_TOOLBAR pt.y += h; @@ -231,9 +231,6 @@ void wxFrame::HandleResized( double timestampsec ) #if wxUSE_MENUS void wxFrame::DetachMenuBar() { - if ( m_frameMenuBar ) - m_frameMenuBar->UnsetInvokingWindow(); - wxFrameBase::DetachMenuBar(); } @@ -257,7 +254,6 @@ void wxFrame::AttachMenuBar( wxMenuBar *menuBar ) if (m_frameMenuBar) { - m_frameMenuBar->SetInvokingWindow( this ); if (makeCurrent) m_frameMenuBar->MacInstallMenuBar(); } @@ -337,17 +333,20 @@ void wxFrame::SetToolBar(wxToolBar *toolbar) if ( m_frameToolBar == toolbar ) return ; +#ifndef __WXOSX_IPHONE__ #if wxOSX_USE_NATIVE_TOOLBAR if ( m_frameToolBar ) m_frameToolBar->MacInstallNativeToolbar( false ) ; #endif - +#endif m_frameToolBar = toolbar ; +#ifndef __WXOSX_IPHONE__ #if wxOSX_USE_NATIVE_TOOLBAR if ( toolbar ) toolbar->MacInstallNativeToolbar( true ) ; #endif +#endif } wxToolBar* wxFrame::CreateToolBar(long style, wxWindowID id, const wxString& name) @@ -375,6 +374,12 @@ void wxFrame::PositionToolBar() } #endif +#ifdef __WXOSX_IPHONE__ + // TODO integrate this in a better way, on iphone the status bar is not a child of the content view + // but the toolbar is + ch -= 20; +#endif + if (GetToolBar()) { int tx, ty, tw, th;