[ 1564062 ] wxComboCtrl popup height fix

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41390 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
2006-09-23 16:17:45 +00:00
parent df348ff8c7
commit 7962f85aae
2 changed files with 4 additions and 3 deletions

View File

@@ -53,7 +53,7 @@
#define BMP_BUTTON_MARGIN 4
#define DEFAULT_POPUP_HEIGHT 200
#define DEFAULT_POPUP_HEIGHT 400
#define DEFAULT_TEXT_INDENT 3

View File

@@ -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