]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/odcombo.cpp
Fix discrepancy between different ways of measuring text extents under Mac.
[wxWidgets.git] / src / generic / odcombo.cpp
index 8321e400d12be99f383f2a170c5fde1828d0b44b..83dc7cbb95bcbacbd954b03fd78209f31947b59a 100644 (file)
@@ -760,6 +760,11 @@ wxSize wxVListBoxComboPopup::GetAdjustedSize( int minWidth, int prefHeight, int
             height = maxHeight;
 
         int totalHeight = GetTotalHeight(); // + 3;
+
+        // Take borders into account on Mac or scrollbars always appear
+#if defined(__WXMAC__)
+        totalHeight += 2;
+#endif
         if ( height >= totalHeight )
         {
             height = totalHeight;
@@ -1085,7 +1090,7 @@ void wxOwnerDrawnComboBox::OnDrawItem( wxDC& dc,
     if ( flags & wxODCB_PAINTING_CONTROL )
     {
         dc.DrawText( GetValue(),
-                     rect.x + GetTextIndent(),
+                     rect.x + GetMargins().x,
                      (rect.height-dc.GetCharHeight())/2 + rect.y );
     }
     else