[gtk+/wip/baedert/drawing: 106/301] gizmo: Remove css box drawing



commit 4119e95f5663106e2a23027c247c8740e91372a8
Author: Timm Bäder <mail baedert org>
Date:   Wed May 3 10:18:41 2017 +0200

    gizmo: Remove css box drawing

 gtk/gtkgizmo.c |   22 +++-------------------
 1 files changed, 3 insertions(+), 19 deletions(-)
---
diff --git a/gtk/gtkgizmo.c b/gtk/gtkgizmo.c
index 5c84012..dc941e2 100644
--- a/gtk/gtkgizmo.c
+++ b/gtk/gtkgizmo.c
@@ -47,7 +47,8 @@ gtk_gizmo_snapshot (GtkWidget   *widget,
 {
   GtkGizmo *self = GTK_GIZMO (widget);
 
-  gtk_css_gadget_snapshot (self->gadget, snapshot);
+  if (self->snapshot_func)
+    self->snapshot_func (self, snapshot);
 }
 
 static void
@@ -85,23 +86,6 @@ gtk_gizmo_allocate_contents (GtkCssGadget        *gadget,
                          out_clip);
 }
 
-static gboolean
-gtk_gizmo_snapshot_contents (GtkCssGadget *gadget,
-                             GtkSnapshot  *snapshot,
-                             int           x,
-                             int           y,
-                             int           width,
-                             int           height,
-                             gpointer      user_data)
-{
-  GtkGizmo *self = GTK_GIZMO (gtk_css_gadget_get_owner (gadget));
-
-  if (self->snapshot_func)
-    return self->snapshot_func (self, snapshot);
-
-  return FALSE;
-}
-
 static void
 gtk_gizmo_finalize (GObject *obj)
 {
@@ -134,7 +118,7 @@ gtk_gizmo_init (GtkGizmo *self)
                                                      GTK_WIDGET (self),
                                                      gtk_gizmo_measure_contents,
                                                      gtk_gizmo_allocate_contents,
-                                                     gtk_gizmo_snapshot_contents,
+                                                     NULL,
                                                      NULL,
                                                      NULL);
 }


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