]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/cocoa/toolbar.mm
Add the possibility to disable invisible wxDataViewCtrl items.
[wxWidgets.git] / src / osx / cocoa / toolbar.mm
index 433eadb1a58551b8613c9ec060ab3d8c70428090..57c8989ccd162443279d720cd302ec24a8d77afc 100644 (file)
@@ -516,7 +516,7 @@ void wxToolBarTool::UpdateImages()
         dc.SelectObject( m_alternateBitmap );
         dc.SetPen( wxPen(*wxBLACK) );
         dc.SetBrush( wxBrush( *wxLIGHT_GREY ));
-        dc.DrawRectangle( 0, 0, w, h );
+        dc.DrawRoundedRectangle( 0, 0, w, h, 2 );
         dc.DrawBitmap( m_bmpNormal, 0, 0, true );
         dc.SelectObject( wxNullBitmap );
 
@@ -537,7 +537,11 @@ void wxToolBarTool::UpdateToggleImage( bool toggle )
         else
             [m_toolbarItem setImage:m_bmpNormal.GetNSImage()];
     }
+    else
 #endif
+    {
+        [(NSButton*)m_controlHandle setState:(toggle ? NSOnState : NSOffState)];
+    }
 }
 
 wxToolBarTool::wxToolBarTool(
@@ -1268,7 +1272,7 @@ bool wxToolBar::DoInsertTool(size_t WXUNUSED(pos), wxToolBarToolBase *toolBase)
 
                 [v setBezelStyle:NSRegularSquareBezelStyle];
                 [v setBordered:NO];
-                [v setButtonType: ( tool->CanBeToggled() ? NSOnOffButton : NSMomentaryPushInButton )];
+                [v setButtonType: ( tool->CanBeToggled() ? NSToggleButton : NSMomentaryPushInButton )];
                 [v setImplementation:tool];
 
                 controlHandle = v;