git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68967
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
virtual void SetBitmap(const wxBitmap& bitmap)
{
// switch bezel style for plain pushbuttons
- if ( bitmap.IsOk() && [GetNSButton() bezelStyle] == NSRoundedBezelStyle )
- [GetNSButton() setBezelStyle:NSRegularSquareBezelStyle ];
-
+ if ( bitmap.IsOk() )
+ {
+ if ([GetNSButton() bezelStyle] == NSRoundedBezelStyle)
+ [GetNSButton() setBezelStyle:NSRegularSquareBezelStyle];
+ }
+ else
+ {
+ [GetNSButton() setBezelStyle:NSRoundedBezelStyle];
+ }
+
wxWidgetCocoaImpl::SetBitmap(bitmap);
}
{
if ( [m_osxView respondsToSelector:@selector(setImage:)] )
{
- [m_osxView setImage:bitmap.GetNSImage()];
+ if (bitmap.IsOk())
+ [m_osxView setImage:bitmap.GetNSImage()];
+ else
+ [m_osxView setImage:nil];
+
[m_osxView setNeedsDisplay:YES];
}
}