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,8 +95,15 @@ public:
|
|||||||
virtual void SetBitmap(const wxBitmap& bitmap)
|
virtual void SetBitmap(const wxBitmap& bitmap)
|
||||||
{
|
{
|
||||||
// switch bezel style for plain pushbuttons
|
// switch bezel style for plain pushbuttons
|
||||||
if ( bitmap.IsOk() && [GetNSButton() bezelStyle] == NSRoundedBezelStyle )
|
if ( bitmap.IsOk() )
|
||||||
[GetNSButton() setBezelStyle:NSRegularSquareBezelStyle ];
|
{
|
||||||
|
if ([GetNSButton() bezelStyle] == NSRoundedBezelStyle)
|
||||||
|
[GetNSButton() setBezelStyle:NSRegularSquareBezelStyle];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
[GetNSButton() setBezelStyle:NSRoundedBezelStyle];
|
||||||
|
}
|
||||||
|
|
||||||
wxWidgetCocoaImpl::SetBitmap(bitmap);
|
wxWidgetCocoaImpl::SetBitmap(bitmap);
|
||||||
}
|
}
|
||||||
|
@@ -1955,7 +1955,11 @@ void wxWidgetCocoaImpl::SetBitmap( const wxBitmap& bitmap )
|
|||||||
{
|
{
|
||||||
if ( [m_osxView respondsToSelector:@selector(setImage:)] )
|
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];
|
[m_osxView setNeedsDisplay:YES];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user