diff options
-rw-r--r-- | gtk/gtkcellrenderer.c | 3 | ||||
-rw-r--r-- | gtk/gtkcellrendererspinner.c | 7 | ||||
-rw-r--r-- | gtk/gtkcellrenderertext.c | 7 | ||||
-rw-r--r-- | gtk/gtkcellrenderertoggle.c | 7 |
4 files changed, 24 insertions, 0 deletions
diff --git a/gtk/gtkcellrenderer.c b/gtk/gtkcellrenderer.c index a60b8885cc..e15323e830 100644 --- a/gtk/gtkcellrenderer.c +++ b/gtk/gtkcellrenderer.c @@ -698,6 +698,9 @@ gtk_cell_renderer_render (GtkCellRenderer *cell, cairo_fill (cr); } + gdk_cairo_rectangle (cr, background_area); + cairo_clip (cr); + GTK_CELL_RENDERER_GET_CLASS (cell)->render (cell, cr, widget, diff --git a/gtk/gtkcellrendererspinner.c b/gtk/gtkcellrendererspinner.c index 5d50f8dfdd..bc63b5ea90 100644 --- a/gtk/gtkcellrendererspinner.c +++ b/gtk/gtkcellrendererspinner.c @@ -372,6 +372,11 @@ gtk_cell_renderer_spinner_render (GtkCellRenderer *cellr, state = GTK_STATE_PRELIGHT; } + cairo_save (cr); + + gdk_cairo_rectangle (cr, cell_area); + cairo_clip (cr); + gtk_paint_spinner (gtk_widget_get_style (widget), cr, state, @@ -380,4 +385,6 @@ gtk_cell_renderer_spinner_render (GtkCellRenderer *cellr, priv->pulse, draw_rect.x, draw_rect.y, draw_rect.width, draw_rect.height); + + cairo_restore (cr); } diff --git a/gtk/gtkcellrenderertext.c b/gtk/gtkcellrenderertext.c index a61e8c6ea6..2cff3a47c3 100644 --- a/gtk/gtkcellrenderertext.c +++ b/gtk/gtkcellrenderertext.c @@ -1833,6 +1833,11 @@ gtk_cell_renderer_text_render (GtkCellRenderer *cell, else if (priv->wrap_width == -1) pango_layout_set_width (layout, -1); + cairo_save (cr); + + gdk_cairo_rectangle (cr, cell_area); + cairo_clip (cr); + gtk_paint_layout (gtk_widget_get_style (widget), cr, state, @@ -1843,6 +1848,8 @@ gtk_cell_renderer_text_render (GtkCellRenderer *cell, cell_area->y + y_offset + ypad, layout); + cairo_restore (cr); + g_object_unref (layout); } diff --git a/gtk/gtkcellrenderertoggle.c b/gtk/gtkcellrenderertoggle.c index e1aa78e03f..177cafd32a 100644 --- a/gtk/gtkcellrenderertoggle.c +++ b/gtk/gtkcellrenderertoggle.c @@ -372,6 +372,11 @@ gtk_cell_renderer_toggle_render (GtkCellRenderer *cell, state = GTK_STATE_INSENSITIVE; } + cairo_save (cr); + + gdk_cairo_rectangle (cr, cell_area); + cairo_clip (cr); + if (priv->radio) { gtk_paint_option (gtk_widget_get_style (widget), @@ -392,6 +397,8 @@ gtk_cell_renderer_toggle_render (GtkCellRenderer *cell, cell_area->y + y_offset + ypad, width, height); } + + cairo_restore (cr); } static gint |