added wxBU_EXACTFIT style

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10942 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2001-07-10 13:44:04 +00:00
parent 2b0ba7ee71
commit 7ef8bfc4c7
4 changed files with 24 additions and 13 deletions

View File

@@ -136,9 +136,12 @@ wxSize wxButton::DoGetBestClientSize() const
// for compatibility with other ports, the buttons default size is never
// less than the standard one
wxSize szDef = GetDefaultSize();
if ( width < szDef.x )
width = szDef.x;
if ( !(GetWindowStyle() & wxBU_EXACTFIT) )
{
wxSize szDef = GetDefaultSize();
if ( width < szDef.x )
width = szDef.x;
}
return wxSize(width, height);
}