X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9467bdb7f5bfde9f99331097daacb93564ca122e..c3a58b249e576b73b01cd74deb1cf879aa6e1975:/src/univ/button.cpp diff --git a/src/univ/button.cpp b/src/univ/button.cpp index 39ac1eb1b8..c1a5aa5b20 100644 --- a/src/univ/button.cpp +++ b/src/univ/button.cpp @@ -126,8 +126,11 @@ bool wxButton::Create(wxWindow *parent, return false; SetLabel(label); - SetImageLabel(bitmap); - // SetBestSize(size); -- called by SetImageLabel() + + if (bitmap.Ok()) + SetImageLabel(bitmap); // SetInitialSize called by SetImageLabel() + else + SetInitialSize(size); CreateInputHandler(wxINP_HANDLER_BUTTON); @@ -324,7 +327,7 @@ void wxButton::SetImageMargins(wxCoord x, wxCoord y) m_marginBmpX = x + 2; m_marginBmpY = y + 2; - SetBestSize(wxDefaultSize); + SetInitialSize(wxDefaultSize); } void wxButton::SetDefault()