]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/iphone/toolbar.mm
wxDataViewCtrl: Fully prepare renderer for Activate() call.
[wxWidgets.git] / src / osx / iphone / toolbar.mm
index 4892a57e826cb131240917f2f1739e3a5db08e0d..c65ee34d6664cb2a45f1fcc2887990b665c24da9 100644 (file)
@@ -121,7 +121,12 @@ wxToolBarToolBase(
     UIBarButtonItemStyle style = UIBarButtonItemStylePlain;
     wxUIToolbar* toolbar = (wxUIToolbar*) tbar->GetHandle();
     
-    if ( bmpNormal.Ok() )
+    if ( id == wxID_SEPARATOR )
+    {
+        [bui initWithBarButtonSystemItem:UIBarButtonSystemItemFixedSpace target:nil action:nil];
+        bui.width = 25.0f;
+    }
+    else if ( bmpNormal.Ok() )
     {
         [bui initWithImage:bmpNormal.GetUIImage() style:UIBarButtonItemStylePlain target:toolbar
                       action:@selector(clickedAction:)];
@@ -260,6 +265,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;