X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/bd044e27b3c7f9b6d56e75b9e1b789be3545cd5e..08670ea85abf4b4946a9ce64971b591d7b1ee30b:/src/osx/carbon/toolbar.cpp diff --git a/src/osx/carbon/toolbar.cpp b/src/osx/carbon/toolbar.cpp index 35b9bd4ff8..f0576260c5 100644 --- a/src/osx/carbon/toolbar.cpp +++ b/src/osx/carbon/toolbar.cpp @@ -1118,9 +1118,9 @@ bool wxToolBar::MacInstallNativeToolbar(bool usesNative) SetAutomaticControlDragTrackingEnabledForWindow( tlw, true ); - m_peer->Move(0,0,0,0 ); + GetPeer()->Move(0,0,0,0 ); SetSize( wxSIZE_AUTO_WIDTH, 0 ); - m_peer->SetVisibility( false ); + GetPeer()->SetVisibility( false ); wxToolBarBase::Show( false ); } } @@ -1135,7 +1135,7 @@ bool wxToolBar::MacInstallNativeToolbar(bool usesNative) ChangeWindowAttributes( tlw, 0, kWindowToolbarButtonAttribute ); MacUninstallNativeToolbar(); - m_peer->SetVisibility( true ); + GetPeer()->SetVisibility( true ); } } @@ -1150,7 +1150,7 @@ void wxToolBar::MacUninstallNativeToolbar() { if (!m_macToolbar) return; - + WindowRef tlw = MAC_WXHWND(MacGetTopLevelWindowRef()); if (tlw) SetWindowToolbar( tlw, NULL ); @@ -1424,6 +1424,18 @@ bool wxToolBar::Realize() return true; } +void wxToolBar::DoLayout() +{ + // TODO port back osx_cocoa layout solution +} + +void wxToolBar::DoSetSize(int x, int y, int width, int height, int sizeFlags) +{ + wxToolBarBase::DoSetSize(x, y, width, height, sizeFlags); + + DoLayout(); +} + void wxToolBar::SetToolBitmapSize(const wxSize& size) { m_defaultWidth = size.x + kwxMacToolBorder;