From 9a2e7481bae95ccb96340c50c289bf709ad8612e Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Fri, 11 Sep 2009 08:55:34 +0000 Subject: [PATCH] Fix on Mac to prevent scrollbars always being shown git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@61876 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/generic/odcombo.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/generic/odcombo.cpp b/src/generic/odcombo.cpp index c7d699f1f1..c95b381460 100644 --- a/src/generic/odcombo.cpp +++ b/src/generic/odcombo.cpp @@ -758,6 +758,11 @@ wxSize wxVListBoxComboPopup::GetAdjustedSize( int minWidth, int prefHeight, int height = maxHeight; int totalHeight = GetTotalHeight(); // + 3; + +#if defined(__WXMAC__) + // Take borders into account, or there will be scrollbars even for one or two items. + totalHeight += 2; +#endif if ( height >= totalHeight ) { height = totalHeight;