[gtk+/gtk-3-20] gtkcssimagebuiltin: Save/restore around cairo_clip



commit ddde1a58a8f31b5f8fed766b27cd7f88b14a834a
Author: Timm Bäder <mail baedert org>
Date:   Tue Apr 19 15:20:14 2016 +0200

    gtkcssimagebuiltin: Save/restore around cairo_clip
    
    This was previously causing trouble in checkbuttons where the check node
    didn't have an icon shadow set, e.g. in Raleigh.

 gtk/gtkcssimagebuiltin.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkcssimagebuiltin.c b/gtk/gtkcssimagebuiltin.c
index 012abba..07d2fec 100644
--- a/gtk/gtkcssimagebuiltin.c
+++ b/gtk/gtkcssimagebuiltin.c
@@ -95,6 +95,7 @@ gtk_css_image_builtin_draw_check (GtkCssImage *image,
     {
       if (checked)
         {
+          cairo_save (cr);
           cairo_translate (cr,
                            x + pad, y + pad);
 
@@ -123,6 +124,7 @@ gtk_css_image_builtin_draw_check (GtkCssImage *image,
                           7.0, 0.0);
 
           cairo_fill (cr);
+          cairo_restore (cr);
         }
     }
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]