]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/anybutton.cpp
Add wxGrid::Render() for drawing the grid to any wxDC.
[wxWidgets.git] / src / msw / anybutton.cpp
index 0e3da82ea348a59e883144101e312498b0da28bd..03a9d7039fd83876e1a036363b6f0e4c4195e18a 100644 (file)
@@ -3,7 +3,7 @@
 // Purpose:     wxAnyButton
 // Author:      Julian Smart
 // Created:     1998-01-04 (extracted from button.cpp)
-// RCS-ID:      $Id: anybutton.cpp 67384 2011-04-03 20:31:32Z DS $
+// RCS-ID:      $Id$
 // Copyright:   (c) Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -395,7 +395,7 @@ wxSize wxMSWButton::GetFittingSize(wxWindow *win,
     {
         // We still need some margin or the text would be overwritten, just
         // make it as small as possible.
-        sizeBtn.x += (3*win->GetCharWidth())/2;
+        sizeBtn.x += (3*win->GetCharWidth());
     }
     else
     {
@@ -656,7 +656,7 @@ void wxAnyButton::DoSetBitmap(const wxBitmap& bitmap, State which)
     if ( m_imageData &&
           bitmap.GetSize() != m_imageData->GetBitmap(State_Normal).GetSize() )
     {
-        wxASSERT_MSG( which == State_Normal,
+        wxASSERT_MSG( (which == State_Normal) || bitmap.IsNull(),
                       "Must set normal bitmap with the new size first" );
 
 #if wxUSE_UXTHEME