Restore height tweaking in wxMSWButton::GetFittingSize().

The change of r66893 was wrong, we do need to adjust the button height here
because the increase to standard height is not enough if we use bigger fonts
that require making taller buttons.

The real problem was the use of EDIT_HEIGHT_FROM_CHAR_HEIGHT() which added too
much to the height, so replace it with something based on the actual font
height. This is still arbitrary but slightly better.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67059 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2011-02-27 12:47:48 +00:00
parent 98977bf454
commit 46e3b70f20

View File

@ -388,6 +388,7 @@ wxSize wxMSWButton::GetFittingSize(wxWindow *win,
wxSize sizeBtn = sizeLabel;
sizeBtn.x += 3*win->GetCharWidth();
sizeBtn.y += win->GetCharHeight()/2;
// account for the shield UAC icon if we have it
if ( flags & Size_AuthNeeded )