[ 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:
@@ -53,7 +53,7 @@
|
|||||||
|
|
||||||
#define BMP_BUTTON_MARGIN 4
|
#define BMP_BUTTON_MARGIN 4
|
||||||
|
|
||||||
#define DEFAULT_POPUP_HEIGHT 200
|
#define DEFAULT_POPUP_HEIGHT 400
|
||||||
|
|
||||||
#define DEFAULT_TEXT_INDENT 3
|
#define DEFAULT_TEXT_INDENT 3
|
||||||
|
|
||||||
|
@@ -724,6 +724,8 @@ wxSize wxVListBoxComboPopup::GetAdjustedSize( int minWidth, int prefHeight, int
|
|||||||
{
|
{
|
||||||
int height = 250;
|
int height = 250;
|
||||||
|
|
||||||
|
maxHeight -= 2; // Must take borders into account
|
||||||
|
|
||||||
if ( m_strings.GetCount() )
|
if ( m_strings.GetCount() )
|
||||||
{
|
{
|
||||||
if ( prefHeight > 0 )
|
if ( prefHeight > 0 )
|
||||||
@@ -743,8 +745,7 @@ wxSize wxVListBoxComboPopup::GetAdjustedSize( int minWidth, int prefHeight, int
|
|||||||
// NB: Calculations that take variable height into account
|
// NB: Calculations that take variable height into account
|
||||||
// are unnecessary.
|
// are unnecessary.
|
||||||
int fih = GetLineHeight(0);
|
int fih = GetLineHeight(0);
|
||||||
int shown = height/fih;
|
height -= height % fih;
|
||||||
height = shown * fih;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Reference in New Issue
Block a user