]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/bmpbuttn.cpp
Allow translated 'Space' in menu accelerators (perhaps more entries should allow...
[wxWidgets.git] / src / msw / bmpbuttn.cpp
index e1be21611f2270c55b891b3106919f67fcb30a17..b8ae50c907c7906e978b403493d85980bbea641f 100644 (file)
@@ -9,10 +9,6 @@
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-#pragma implementation "bmpbuttn.h"
-#endif
-
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
@@ -103,8 +99,6 @@ bitmap "focus" ,
 bitmap "disabled" ,
 */
 
-#define BUTTON_HEIGHT_FACTOR (EDIT_CONTROL_FACTOR * 1.1)
-
 bool wxBitmapButton::Create(wxWindow *parent, wxWindowID id,
     const wxBitmap& bitmap,
     const wxPoint& pos,
@@ -494,8 +488,10 @@ wxSize wxBitmapButton::DoGetBestSize() const
 {
     if ( m_bmpNormal.Ok() )
     {
-        return wxSize(m_bmpNormal.GetWidth() + 2*m_marginX,
+        wxSize best(m_bmpNormal.GetWidth() + 2*m_marginX,
                       m_bmpNormal.GetHeight() + 2*m_marginY);
+        CacheBestSize(best);
+        return best;
     }
 
     // no idea what our best size should be, defer to the base class