]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/combobox.cpp
Fix broken and missing DataView interface items for Phoenix
[wxWidgets.git] / src / gtk / combobox.cpp
index d29e2acb48d87f1bcb1f85e8d8f097ba1dc26ba6..ae69a86b371b20105efdae3aa735a20813d0021d 100644 (file)
@@ -187,8 +187,6 @@ bool wxComboBox::Create( wxWindow *parent, wxWindowID id, const wxString& value,
                           G_CALLBACK (gtkcombobox_popupshown_callback), this);
     }
 
-    SetInitialSize(size); // need this too because this is a wxControlWithItems
-
     return true;
 }
 
@@ -406,4 +404,17 @@ void wxComboBox::Dismiss()
 {
     gtk_combo_box_popdown( GTK_COMBO_BOX(m_widget) );
 }
+
+wxSize wxComboBox::DoGetSizeFromTextSize(int xlen, int ylen) const
+{
+    wxSize tsize( wxChoice::DoGetSizeFromTextSize(xlen, ylen) );
+
+    // Add the margins we have previously set, but only the horizontal border
+    // as vertical one has been taken account in the prevoius call.
+    // Also get other GTK+ margins.
+    tsize.IncBy( GTKGetEntryMargins(GetEntry()).x, 0);
+
+    return tsize;
+}
+
 #endif // wxUSE_COMBOBOX