]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/bmpbuttn.cpp
updates from Adrián González Alba
[wxWidgets.git] / src / mac / carbon / bmpbuttn.cpp
index 48fec8aac677ac507d8e7c50ffb204f947c2faf2..f6badadfeb5a52c9df4c259f3628de0ff1085c1f 100644 (file)
@@ -6,28 +6,31 @@
 // Created:     1998-01-01
 // RCS-ID:      $Id$
 // Copyright:   (c) Stefan Csomor
-// Licence:       wxWindows licence
+// Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
 #include "wx/wxprec.h"
 
 #if wxUSE_BMPBUTTON
 
-#include "wx/window.h"
 #include "wx/bmpbuttn.h"
 
+#ifndef WX_PRECOMP
+    #include "wx/window.h"
+    #include "wx/bitmap.h"
+#endif
+
 IMPLEMENT_DYNAMIC_CLASS(wxBitmapButton, wxButton)
 
 #include "wx/mac/uma.h"
-#include "wx/bitmap.h"
 
 bool wxBitmapButton::Create( wxWindow *parent,
-    wxWindowID id, const wxBitmap& bitmap,
-    const wxPoint& pos,
-    const wxSize& size,
-    long style,
-    const wxValidator& validator,
-    const wxString& name )
+                             wxWindowID id, const wxBitmap& bitmap,
+                             const wxPoint& pos,
+                             const wxSize& size,
+                             long style,
+                             const wxValidator& validator,
+                             const wxString& name )
 {
     m_macIsUserPane = false;
 
@@ -55,9 +58,9 @@ bool wxBitmapButton::Create( wxWindow *parent,
     if ( bitmap.Ok() )
     {
         wxSize newSize = DoGetBestSize();
-        if ( width == -1 )
+        if ( width == wxDefaultCoord )
             width = newSize.x;
-        if ( height == -1 )
+        if ( height == wxDefaultCoord )
             height = newSize.y;
     }