]> git.saurik.com Git - wxWidgets.git/commitdiff
[ 1564062 ] wxComboCtrl popup height fix
authorRobert Roebling <robert@roebling.de>
Sat, 23 Sep 2006 16:17:45 +0000 (16:17 +0000)
committerRobert Roebling <robert@roebling.de>
Sat, 23 Sep 2006 16:17:45 +0000 (16:17 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41390 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/combocmn.cpp
src/generic/odcombo.cpp

index 4f6128e7768e670b40e7c7aae59d29c1c259a67f..deeff9218ac13b883a8d89feb29cd64e39d184e6 100644 (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
 
index 42e12d9e5f6c39d031515136d25a14066bf2087f..575641d93dc2e1b2e61e690ea4ace8f6ba34c7f8 100644 (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