fixes #13443, thanks :-)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68967 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -95,9 +95,16 @@ public:
|
||||
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);
|
||||
}
|
||||
|
||||
|
@@ -1955,7 +1955,11 @@ void wxWidgetCocoaImpl::SetBitmap( const wxBitmap& 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];
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user