X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9f8845289521c7f53e95b6dfd8275daab8b05639..62f864c32c53356b7228591c85b14abc491c46f0:/src/mac/carbon/statbmp.cpp diff --git a/src/mac/carbon/statbmp.cpp b/src/mac/carbon/statbmp.cpp index 69b6f8b448..9a13660d97 100644 --- a/src/mac/carbon/statbmp.cpp +++ b/src/mac/carbon/statbmp.cpp @@ -9,18 +9,18 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma implementation "statbmp.h" #endif -#include "wx/defs.h" +#include "wx/wxprec.h" + +#if wxUSE_STATBMP #include "wx/statbmp.h" #include "wx/dcclient.h" -#if !USE_SHARED_LIBRARY IMPLEMENT_DYNAMIC_CLASS(wxStaticBitmap, wxControl) -#endif /* * wxStaticBitmap @@ -74,6 +74,12 @@ void wxStaticBitmap::OnPaint( wxPaintEvent& WXUNUSED(event) ) wxSize wxStaticBitmap::DoGetBestSize() const { - return DoGetSizeFromClientSize( wxSize( m_bitmap.GetWidth() , m_bitmap.GetHeight() ) ) ; + if ( m_bitmap.Ok() ) + return DoGetSizeFromClientSize( wxSize(m_bitmap.GetWidth(), m_bitmap.GetHeight()) ); + + // this is completely arbitrary + return DoGetSizeFromClientSize( wxSize(16, 16) ); } +#endif +