From 7962f85aaeb3014f9b77cffb67811b24dbb2473f Mon Sep 17 00:00:00 2001 From: Robert Roebling Date: Sat, 23 Sep 2006 16:17:45 +0000 Subject: [PATCH] [ 1564062 ] wxComboCtrl popup height fix git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41390 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/combocmn.cpp | 2 +- src/generic/odcombo.cpp | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/common/combocmn.cpp b/src/common/combocmn.cpp index 4f6128e776..deeff9218a 100644 --- a/src/common/combocmn.cpp +++ b/src/common/combocmn.cpp @@ -53,7 +53,7 @@ #define BMP_BUTTON_MARGIN 4 -#define DEFAULT_POPUP_HEIGHT 200 +#define DEFAULT_POPUP_HEIGHT 400 #define DEFAULT_TEXT_INDENT 3 diff --git a/src/generic/odcombo.cpp b/src/generic/odcombo.cpp index 42e12d9e5f..575641d93d 100644 --- a/src/generic/odcombo.cpp +++ b/src/generic/odcombo.cpp @@ -724,6 +724,8 @@ wxSize wxVListBoxComboPopup::GetAdjustedSize( int minWidth, int prefHeight, int { int height = 250; + maxHeight -= 2; // Must take borders into account + if ( m_strings.GetCount() ) { if ( prefHeight > 0 ) @@ -743,8 +745,7 @@ wxSize wxVListBoxComboPopup::GetAdjustedSize( int minWidth, int prefHeight, int // NB: Calculations that take variable height into account // are unnecessary. int fih = GetLineHeight(0); - int shown = height/fih; - height = shown * fih; + height -= height % fih; } } else -- 2.45.2