X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/96e3c3d44aa64b301cde6184d6290bc025a0bc03..0dbfd66d0b35352a0f60e7190b72815052b3d2d4:/src/univ/button.cpp?ds=sidebyside diff --git a/src/univ/button.cpp b/src/univ/button.cpp index 05c25ef66b..23a4d96eea 100644 --- a/src/univ/button.cpp +++ b/src/univ/button.cpp @@ -45,7 +45,7 @@ // ---------------------------------------------------------------------------- // default margins around the image -static const wxCoord DEFAULT_BTN_MARGIN_X = 0; +static const wxCoord DEFAULT_BTN_MARGIN_X = 0; // We should give space for the border, at least. static const wxCoord DEFAULT_BTN_MARGIN_Y = 0; // ============================================================================ @@ -136,12 +136,14 @@ wxSize wxButton::DoGetBestClientSize() const // for compatibility with other ports, the buttons default size is never // less than the standard one +#ifndef __WXX11__ if ( !(GetWindowStyle() & wxBU_EXACTFIT) ) { wxSize szDef = GetDefaultSize(); if ( width < szDef.x ) width = szDef.x; } +#endif return wxSize(width, height); } @@ -236,9 +238,9 @@ void wxButton::SetImageLabel(const wxBitmap& bitmap) void wxButton::SetImageMargins(wxCoord x, wxCoord y) { - m_marginBmpX = x; - m_marginBmpY = y; - + m_marginBmpX = x + 2; + m_marginBmpY = y + 2; + SetBestSize(wxDefaultSize); }