X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/430974f8c443dcbe1616a85238ead7db5fb88e43..a29ffc34c07e0408a798538b268d4733ee62965c:/src/os2/button.cpp diff --git a/src/os2/button.cpp b/src/os2/button.cpp index 1a7ab387c0..46892a89fc 100644 --- a/src/os2/button.cpp +++ b/src/os2/button.cpp @@ -162,13 +162,19 @@ wxSize wxButton::DoGetBestSize() const // nHeightButton += nHeightChar/1.5; - wxSize vSize = GetDefaultSize(); + if (!HasFlag(wxBU_EXACTFIT)) + { + wxSize vSize = GetDefaultSize(); - if (nWidthButton > vSize.x) - vSize.x = nWidthButton; - if (nHeightButton > vSize.y) - vSize.y = nHeightButton; - return vSize; + if (nWidthButton > vSize.x) + vSize.x = nWidthButton; + if (nHeightButton > vSize.y) + vSize.y = nHeightButton; + return vSize; + } + return wxSize( nWidthButton + ,nHeightButton + ); } // end of wxButton::DoGetBestSize /* static */