X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ce9685190eecd78ce64b7bb5321fdde960800456..e17b6377be593ce71d722beb3cdcffb67baccf00:/src/generic/odcombo.cpp?ds=sidebyside 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