[gtk+/wip/baedert/drawing: 53/306] toolbar: Remove css box rendering



commit 66bce88817d730e04ee5865db4df7cb2a034f0fd
Author: Timm Bäder <mail baedert org>
Date:   Wed May 3 11:19:23 2017 +0200

    toolbar: Remove css box rendering

 gtk/gtktoolbar.c |   37 ++++++-------------------------------
 1 files changed, 6 insertions(+), 31 deletions(-)
---
diff --git a/gtk/gtktoolbar.c b/gtk/gtktoolbar.c
index 72b273d..0e9a2e6 100644
--- a/gtk/gtktoolbar.c
+++ b/gtk/gtktoolbar.c
@@ -261,13 +261,6 @@ static void       gtk_toolbar_measure              (GtkCssGadget   *gadget,
                                                     int            *minimum_baseline,
                                                     int            *natural_baseline,
                                                     gpointer        data);
-static gboolean   gtk_toolbar_render               (GtkCssGadget *gadget,
-                                                    GtkSnapshot  *snapshot,
-                                                    int           x,
-                                                    int           y,
-                                                    int           width,
-                                                    int           height,
-                                                    gpointer      data);
 static void       gtk_toolbar_pressed_cb           (GtkGestureMultiPress *gesture,
                                                     int                   n_press,
                                                     double                x,
@@ -639,7 +632,7 @@ gtk_toolbar_init (GtkToolbar *toolbar)
                                                      widget,
                                                      gtk_toolbar_measure,
                                                      gtk_toolbar_allocate,
-                                                     gtk_toolbar_render,
+                                                     NULL,
                                                      NULL, NULL);
 
   priv->arrow_button = gtk_toggle_button_new ();
@@ -740,16 +733,10 @@ gtk_toolbar_get_property (GObject    *object,
     }
 }
 
-static gboolean
-gtk_toolbar_render (GtkCssGadget *gadget,
-                    GtkSnapshot  *snapshot,
-                    int           x,
-                    int           y,
-                    int           width,
-                    int           height,
-                    gpointer      data)
+static void
+gtk_toolbar_snapshot (GtkWidget   *widget,
+                      GtkSnapshot *snapshot)
 {
-  GtkWidget *widget = gtk_css_gadget_get_owner (gadget);
   GtkToolbar *toolbar = GTK_TOOLBAR (widget);
   GtkToolbarPrivate *priv = toolbar->priv;
   GList *list;
@@ -757,25 +744,13 @@ gtk_toolbar_render (GtkCssGadget *gadget,
   for (list = priv->content; list != NULL; list = list->next)
     {
       ToolbarContent *content = list->data;
-      
+
       toolbar_content_snapshot (content, GTK_CONTAINER (widget), snapshot);
     }
-  
+
   gtk_widget_snapshot_child (widget,
                              priv->arrow_button,
                              snapshot);
-
-  return FALSE;
-}
-
-static void
-gtk_toolbar_snapshot (GtkWidget   *widget,
-                      GtkSnapshot *snapshot)
-{
-  GtkToolbar *toolbar = GTK_TOOLBAR (widget);
-  GtkToolbarPrivate *priv = toolbar->priv;
-
-  gtk_css_gadget_snapshot (priv->gadget, snapshot);
 }
 
 static void


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