From 2f60684844da6d92e085465cb6aeb29e6a9081f7 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Tue, 17 Feb 2004 14:44:22 +0000 Subject: [PATCH] Fixed a bug in DoGetBestSize that would make wxSpinCtrl too tall git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@25845 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/spinctrl.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/msw/spinctrl.cpp b/src/msw/spinctrl.cpp index 6cc42efe36..33b66d1616 100644 --- a/src/msw/spinctrl.cpp +++ b/src/msw/spinctrl.cpp @@ -463,7 +463,12 @@ wxSize wxSpinCtrl::DoGetBestSize() const wxGetCharSize(GetHWND(), NULL, &y, &GetFont()); y = EDIT_HEIGHT_FROM_CHAR_HEIGHT(y); - if ( sizeBtn.y < y ) + // JACS: we should always use the height calculated + // from above, because otherwise we'll get a spin control + // that's too big. So never use the height calculated + // from wxSpinButton::DoGetBestSize(). + + // if ( sizeBtn.y < y ) { // make the text tall enough sizeBtn.y = y;