Made wxBU_EXACTFIT work as documented instead of being ignored.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16023 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2002-07-03 21:34:48 +00:00
parent ab2469043f
commit 188b9f2e38

View File

@@ -147,11 +147,16 @@ wxSize wxButton::DoGetBestSize() const
// the button height is proportional to the height of the font used
int hBtn = BUTTON_HEIGHT_FROM_CHAR_HEIGHT(hChar);
wxSize sz = GetDefaultSize();
if (wBtn > sz.x) sz.x = wBtn;
if (hBtn > sz.y) sz.y = hBtn;
if (!HasFlag(wxBU_EXACTFIT))
{
wxSize sz = GetDefaultSize();
if (wBtn > sz.x) sz.x = wBtn;
if (hBtn > sz.y) sz.y = hBtn;
return sz;
}
else
return wxSize(wBtn, hBtn);
return sz;
}
/* static */