]> git.saurik.com Git - wxWidgets.git/blobdiff - src/univ/statbmp.cpp
Fix discrepancy between different ways of measuring text extents under Mac.
[wxWidgets.git] / src / univ / statbmp.cpp
index ee56f372a58cddcd0aba20e526d911e1d0890de3..6059a8ab2e195ce4a8a4a18ae1f6d18e470d2f7c 100644 (file)
@@ -1,12 +1,12 @@
 /////////////////////////////////////////////////////////////////////////////
-// Name:        univ/statbmp.cpp
+// Name:        src/univ/statbmp.cpp
 // Purpose:     wxStaticBitmap implementation
 // Author:      Vadim Zeitlin
 // Modified by:
 // Created:     25.08.00
 // RCS-ID:      $Id$
 // Copyright:   (c) 2000 SciTech Software, Inc. (www.scitechsoft.com)
-// Licence:     wxWindows license
+// Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
 // ============================================================================
 // headers
 // ----------------------------------------------------------------------------
 
-#ifdef __GNUG__
-    #pragma implementation "univstatbmp.h"
-#endif
-
 #include "wx/wxprec.h"
 
 #ifdef __BORLANDC__
 
 #if wxUSE_STATBMP
 
+#include "wx/statbmp.h"
+
 #ifndef WX_PRECOMP
     #include "wx/dc.h"
     #include "wx/icon.h"
-    #include "wx/statbmp.h"
     #include "wx/validate.h"
 #endif
 
@@ -58,17 +55,15 @@ bool wxStaticBitmap::Create(wxWindow *parent,
                             const wxString &name)
 {
     if ( !wxControl::Create(parent, id, pos, size, style, wxDefaultValidator, name) )
-        return FALSE;
-
-    m_hasDialogBackground = TRUE;
+        return false;
 
     // set bitmap first
     SetBitmap(label);
 
     // and adjust our size to fit it after this
-    SetBestSize(size);
+    SetInitialSize(size);
 
-    return TRUE;
+    return true;
 }
 
 // ----------------------------------------------------------------------------
@@ -111,4 +106,3 @@ void wxStaticBitmap::DoDraw(wxControlRenderer *renderer)
 }
 
 #endif // wxUSE_STATBMP
-