[gtk+/wip/baedert/drawing: 58/262] scrolledwindow: Remove css box drawing



commit 3cbe22b07e9765e50004575142e1322e961aea7b
Author: Timm Bäder <mail baedert org>
Date:   Wed May 3 11:43:47 2017 +0200

    scrolledwindow: Remove css box drawing

 gtk/gtkscrolledwindow.c |   36 +++++++++---------------------------
 1 files changed, 9 insertions(+), 27 deletions(-)
---
diff --git a/gtk/gtkscrolledwindow.c b/gtk/gtkscrolledwindow.c
index 634e7f2..61615d4 100644
--- a/gtk/gtkscrolledwindow.c
+++ b/gtk/gtkscrolledwindow.c
@@ -1863,31 +1863,6 @@ gtk_scrolled_window_snapshot_undershoot (GtkScrolledWindow *scrolled_window,
     }
 }
 
-static gboolean
-gtk_scrolled_window_render (GtkCssGadget *gadget,
-                            GtkSnapshot  *snapshot,
-                            int           x,
-                            int           y,
-                            int           width,
-                            int           height,
-                            gpointer      data)
-{
-  GtkWidget *widget = gtk_css_gadget_get_owner (gadget);
-  GtkScrolledWindow *scrolled_window = GTK_SCROLLED_WINDOW (widget);
-  GtkScrolledWindowPrivate *priv = scrolled_window->priv;
-
-  if (priv->hscrollbar_visible &&
-      priv->vscrollbar_visible)
-    gtk_scrolled_window_snapshot_scrollbars_junction (scrolled_window, snapshot);
-
-  GTK_WIDGET_CLASS (gtk_scrolled_window_parent_class)->snapshot (widget, snapshot);
-
-  gtk_scrolled_window_snapshot_undershoot (scrolled_window, snapshot);
-  gtk_scrolled_window_snapshot_overshoot (scrolled_window, snapshot);
-
-  return FALSE;
-}
-
 static void
 gtk_scrolled_window_init (GtkScrolledWindow *scrolled_window)
 {
@@ -1971,7 +1946,7 @@ gtk_scrolled_window_init (GtkScrolledWindow *scrolled_window)
                                                      widget,
                                                      gtk_scrolled_window_measure,
                                                      gtk_scrolled_window_allocate,
-                                                     gtk_scrolled_window_render,
+                                                     NULL,
                                                      NULL, NULL);
   for (i = 0; i < 4; i++)
     {
@@ -2789,7 +2764,14 @@ gtk_scrolled_window_snapshot (GtkWidget   *widget,
   GtkScrolledWindow *scrolled_window = GTK_SCROLLED_WINDOW (widget);
   GtkScrolledWindowPrivate *priv = scrolled_window->priv;
 
-  gtk_css_gadget_snapshot (priv->gadget, snapshot);
+  if (priv->hscrollbar_visible &&
+      priv->vscrollbar_visible)
+    gtk_scrolled_window_snapshot_scrollbars_junction (scrolled_window, snapshot);
+
+  GTK_WIDGET_CLASS (gtk_scrolled_window_parent_class)->snapshot (widget, snapshot);
+
+  gtk_scrolled_window_snapshot_undershoot (scrolled_window, snapshot);
+  gtk_scrolled_window_snapshot_overshoot (scrolled_window, snapshot);
 }
 
 static gboolean


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