git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16023
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
// the button height is proportional to the height of the font used
int hBtn = BUTTON_HEIGHT_FROM_CHAR_HEIGHT(hChar);
// 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);