X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ce9685190eecd78ce64b7bb5321fdde960800456..82ec1f703513f5a09edfea7403481c23fe7b4d1e:/src/generic/odcombo.cpp 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