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 );
else
[m_toolbarItem setImage:m_bmpNormal.GetNSImage()];
}
+ else
#endif
+ {
+ [(NSButton*)m_controlHandle setState:(toggle ? NSOnState : NSOffState)];
+ }
}
wxToolBarTool::wxToolBarTool(
}
wxCFStringRef cfidentifier;
- const NSString *nsItemId;
+ NSString *nsItemId;
if (tool->GetStyle() == wxTOOL_STYLE_SEPARATOR)
{
nsItemId = tool->IsStretchable() ? NSToolbarFlexibleSpaceItemIdentifier
#if wxOSX_USE_NATIVE_TOOLBAR
if (m_macToolbar != NULL)
{
- const NSString * const
- nsItemId = tool->IsStretchable() ? NSToolbarFlexibleSpaceItemIdentifier
+ NSString * nsItemId = tool->IsStretchable() ? NSToolbarFlexibleSpaceItemIdentifier
: NSToolbarSeparatorItemIdentifier;
NSToolbarItem* item = [[NSToolbarItem alloc] initWithItemIdentifier:nsItemId];
tool->SetToolbarItemRef( item );
[v setBezelStyle:NSRegularSquareBezelStyle];
[v setBordered:NO];
- [v setButtonType: ( tool->CanBeToggled() ? NSOnOffButton : NSMomentaryPushInButton )];
+ [v setButtonType: ( tool->CanBeToggled() ? NSToggleButton : NSMomentaryPushInButton )];
[v setImplementation:tool];
controlHandle = v;