[gtk+/wip/baedert/drawing: 15/183] flowbox: Remove css box drawing



commit ecaabc52678342f718203be42ae101cce38bc3c4
Author: Timm Bäder <mail baedert org>
Date:   Wed May 3 10:29:02 2017 +0200

    flowbox: Remove css box drawing

 gtk/gtkflowbox.c |   52 +++++++++-------------------------------------------
 1 files changed, 9 insertions(+), 43 deletions(-)
---
diff --git a/gtk/gtkflowbox.c b/gtk/gtkflowbox.c
index 3499fbb..0f9e9ab 100644
--- a/gtk/gtkflowbox.c
+++ b/gtk/gtkflowbox.c
@@ -382,31 +382,6 @@ gtk_flow_box_child_activate (GtkFlowBoxChild *child)
     gtk_flow_box_select_and_activate (box, child);
 }
 
-static void
-gtk_flow_box_child_snapshot (GtkWidget   *widget,
-                             GtkSnapshot *snapshot)
-{
-  gtk_css_gadget_snapshot (CHILD_PRIV (GTK_FLOW_BOX_CHILD (widget))->gadget, snapshot);
-}
-
-static gboolean
-gtk_flow_box_child_render (GtkCssGadget *gadget,
-                           GtkSnapshot  *snapshot,
-                           int           x,
-                           int           y,
-                           int           width,
-                           int           height,
-                           gpointer      data)
-{
-  GtkWidget *widget;
-
-  widget = gtk_css_gadget_get_owner (gadget);
-
-  GTK_WIDGET_CLASS (gtk_flow_box_child_parent_class)->snapshot (widget, snapshot);
-
-  return gtk_widget_has_visible_focus (widget);
-}
-
 /* Size allocation {{{3 */
 
 static GtkSizeRequestMode
@@ -515,7 +490,6 @@ gtk_flow_box_child_class_init (GtkFlowBoxChildClass *class)
 
   object_class->finalize = gtk_flow_box_child_finalize;
 
-  widget_class->snapshot = gtk_flow_box_child_snapshot;
   widget_class->get_request_mode = gtk_flow_box_child_get_request_mode;
   widget_class->measure = gtk_flow_box_child_measure_;
   widget_class->size_allocate = gtk_flow_box_child_size_allocate;
@@ -559,7 +533,7 @@ gtk_flow_box_child_init (GtkFlowBoxChild *child)
                                                      GTK_WIDGET (child),
                                                      gtk_flow_box_child_measure,
                                                      gtk_flow_box_child_allocate,
-                                                     gtk_flow_box_child_render,
+                                                     NULL,
                                                      NULL,
                                                      NULL);
 }
@@ -2470,24 +2444,18 @@ static void
 gtk_flow_box_snapshot (GtkWidget   *widget,
                        GtkSnapshot *snapshot)
 {
-  gtk_css_gadget_snapshot (BOX_PRIV (widget)->gadget, snapshot);
-}
-
-static gboolean
-gtk_flow_box_render (GtkCssGadget *gadget,
-                     GtkSnapshot  *snapshot,
-                     int           x,
-                     int           y,
-                     int           width,
-                     int           height,
-                     gpointer      data)
-{
-  GtkWidget *widget = gtk_css_gadget_get_owner (gadget);
   GtkFlowBox *box = GTK_FLOW_BOX (widget);
   GtkFlowBoxPrivate *priv = BOX_PRIV (box);
+  GtkAllocation allocation;
+  int x, y, width, height;
 
   GTK_WIDGET_CLASS (gtk_flow_box_parent_class)->snapshot (widget, snapshot);
 
+  x = allocation.x;
+  y = allocation.y;
+  width = allocation.width;
+  height = allocation.height;
+
   if (priv->rubberband_first && priv->rubberband_last)
     {
       GtkStyleContext *context;
@@ -2586,8 +2554,6 @@ G_GNUC_END_IGNORE_DEPRECATIONS
       gtk_style_context_restore (context);
       cairo_destroy (cr);
     }
-
-  return gtk_widget_has_visible_focus (widget);
 }
 
 /* Autoscrolling {{{3 */
@@ -4023,7 +3989,7 @@ gtk_flow_box_init (GtkFlowBox *box)
                                                      GTK_WIDGET (box),
                                                      gtk_flow_box_measure,
                                                      gtk_flow_box_allocate,
-                                                     gtk_flow_box_render,
+                                                     NULL,
                                                      NULL,
                                                      NULL);
 }


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