Add gtk_cell_renderer_set_padding() compatibility function

This commit is contained in:
Paul Cornett 2015-09-01 08:41:15 -07:00
parent 5619e7f964
commit 83ce88402c
2 changed files with 8 additions and 8 deletions

View File

@ -193,6 +193,13 @@ static inline void wx_gtk_cell_renderer_get_padding(GtkCellRenderer* cell, gint*
}
#define gtk_cell_renderer_get_padding wx_gtk_cell_renderer_get_padding
static inline void wx_gtk_cell_renderer_set_padding(GtkCellRenderer* cell, gint xpad, gint ypad)
{
cell->xpad = xpad;
cell->ypad = ypad;
}
#define gtk_cell_renderer_set_padding wx_gtk_cell_renderer_set_padding
static inline void wx_gtk_widget_get_allocation(GtkWidget* widget, GtkAllocation* allocation)
{
*allocation = widget->allocation;

View File

@ -2439,15 +2439,8 @@ void wxDataViewCustomRenderer::GtkInitTextRenderer()
g_object_ref_sink(m_text_renderer);
GtkApplyAlignment(GTK_CELL_RENDERER(m_text_renderer));
#if GTK_CHECK_VERSION(2,18,0)
#ifndef __WXGTK3__
if (gtk_check_version(2,18,0) == NULL)
#endif
{
gtk_cell_renderer_set_padding(GTK_CELL_RENDERER(m_text_renderer), 0, 0);
}
#endif
}
GtkCellRendererText *wxDataViewCustomRenderer::GtkGetTextRenderer() const
{