- sizeBtn = GetFittingSize(btn, sizeBtn, flags);
+ return GetFittingSize(btn, sizeBtn, flags);
+}
+
+wxSize wxMSWButton::IncreaseToStdSizeAndCache(wxControl *btn, const wxSize& size)
+{
+ wxSize sizeBtn(size);
// all buttons have at least the standard size unless the user explicitly
// wants them to be of smaller size and used wxBU_EXACTFIT style when
// creating the button
if ( !btn->HasFlag(wxBU_EXACTFIT) )
{
// all buttons have at least the standard size unless the user explicitly
// wants them to be of smaller size and used wxBU_EXACTFIT style when
// creating the button
if ( !btn->HasFlag(wxBU_EXACTFIT) )
{
// Note that we intentionally don't use GetDefaultSize() here, because
// it's inexact -- dialog units depend on this dialog's font.
wxSize sizeDef = btn->ConvertDialogToPixels(wxSize(50, 14));
// Note that we intentionally don't use GetDefaultSize() here, because
// it's inexact -- dialog units depend on this dialog's font.
wxSize sizeDef = btn->ConvertDialogToPixels(wxSize(50, 14));
// account for the bitmap size
const wxSize sizeBmp = m_imageData->GetBitmap(State_Normal).GetSize();
// account for the bitmap size
const wxSize sizeBmp = m_imageData->GetBitmap(State_Normal).GetSize();
- // account for the text part if we have it or if we don't have any image at
- // all (buttons initially created with empty label should still have a non
- // zero size)
- if ( ShowsLabel() || !m_imageData )
+ // Account for the text part if we have it.
+ if ( ShowsLabel() )