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:
@@ -147,11 +147,16 @@ wxSize wxButton::DoGetBestSize() const
|
|||||||
// the button height is proportional to the height of the font used
|
// the button height is proportional to the height of the font used
|
||||||
int hBtn = BUTTON_HEIGHT_FROM_CHAR_HEIGHT(hChar);
|
int hBtn = BUTTON_HEIGHT_FROM_CHAR_HEIGHT(hChar);
|
||||||
|
|
||||||
wxSize sz = GetDefaultSize();
|
if (!HasFlag(wxBU_EXACTFIT))
|
||||||
if (wBtn > sz.x) sz.x = wBtn;
|
{
|
||||||
if (hBtn > sz.y) sz.y = hBtn;
|
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 */
|
/* static */
|
||||||
|
Reference in New Issue
Block a user