diff --git a/src/msw/anybutton.cpp b/src/msw/anybutton.cpp index 9310e33f1a..7a44e9d0ed 100644 --- a/src/msw/anybutton.cpp +++ b/src/msw/anybutton.cpp @@ -589,9 +589,6 @@ wxSize wxAnyButton::DoGetBestSize() const SIZE idealSize = { 0, 0 }; if ( ::SendMessage(GetHwnd(), BCM_GETIDEALSIZE, 0, (LPARAM)&idealSize) ) size.Set(idealSize.cx, idealSize.cy); - - if ( m_imageData ) - AdjustForBitmapMargins(size); } // If we failed to set the size using BCM_GETIDEALSIZE above, determine it @@ -621,11 +618,11 @@ wxSize wxAnyButton::DoGetBestSize() const size = wxMSWButton::ComputeBestFittingSize(self, flags); } } - - if ( m_imageData ) - AdjustForBitmapSize(size); } + if ( m_imageData ) + AdjustForBitmapMargins(size); + return wxMSWButton::IncreaseToStdSizeAndCache(self, size); }