Fixed GtkBorder allocation (hopefully)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61836 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Jaakko Salli
2009-09-05 13:23:03 +00:00
parent 0847e36eff
commit c39b6e1edd

View File

@@ -350,7 +350,7 @@ bool wxTextEntry::DoSetMargins(const wxPoint& margins)
#if GTK_CHECK_VERSION(2,14,0)
newBorder = gtk_border_new();
#else
newBorder = new GtkBorder;
newBorder = g_slice_new0(GtkBorder);
#endif
// Use some reasonable defaults for initial margins
newBorder->left = 2;
@@ -370,6 +370,12 @@ bool wxTextEntry::DoSetMargins(const wxPoint& margins)
gtk_entry_set_inner_border(entry, newBorder);
#if GTK_CHECK_VERSION(2,14,0)
gtk_border_free(newBorder);
#else
g_slice_free(GtkBorder, newBorder);
#endif
return true;
#else
wxUnusedVar(margins);