X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/193e19cfdfc0506d9ddc19b3532d340fd7421bae..a336f999c2c432b1fc6c6324a70bdaab02c0886e:/src/univ/button.cpp?ds=inline diff --git a/src/univ/button.cpp b/src/univ/button.cpp index b06789a25d..4bde5f3b96 100644 --- a/src/univ/button.cpp +++ b/src/univ/button.cpp @@ -34,6 +34,7 @@ #include "wx/dcscreen.h" #include "wx/button.h" #include "wx/validate.h" + #include "wx/settings.h" #endif #include "wx/univ/renderer.h" @@ -136,15 +137,16 @@ 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) ) + // less than the standard one, but not when display not PDAs. + if (wxSystemSettings::GetScreenType() > wxSYS_SCREEN_PDA) { - wxSize szDef = GetDefaultSize(); - if ( width < szDef.x ) - width = szDef.x; + if ( !(GetWindowStyle() & wxBU_EXACTFIT) ) + { + wxSize szDef = GetDefaultSize(); + if ( width < szDef.x ) + width = szDef.x; + } } -#endif return wxSize(width, height); }