[gtk+/wip/baedert/drawing: 30/156] switch: Remove css box drawing



commit cd781462e149152b627bbe3b1d3be2dc4f38ea1c
Author: Timm Bäder <mail baedert org>
Date:   Wed May 3 10:31:24 2017 +0200

    switch: Remove css box drawing

 gtk/gtkswitch.c |   26 +++++---------------------
 1 files changed, 5 insertions(+), 21 deletions(-)
---
diff --git a/gtk/gtkswitch.c b/gtk/gtkswitch.c
index 5077b69..bf9bede 100644
--- a/gtk/gtkswitch.c
+++ b/gtk/gtkswitch.c
@@ -505,31 +505,15 @@ gtk_switch_unmap (GtkWidget *widget)
   GTK_WIDGET_CLASS (gtk_switch_parent_class)->unmap (widget);
 }
 
-
-static gboolean
-gtk_switch_snapshot_trough (GtkCssGadget *gadget,
-                            GtkSnapshot  *snapshot,
-                            int           x,
-                            int           y,
-                            int           width,
-                            int           height,
-                            gpointer      data)
-{
-  GtkWidget *widget = gtk_css_gadget_get_owner (gadget);
+static void
+gtk_switch_snapshot (GtkWidget   *widget,
+                     GtkSnapshot *snapshot)
+{
   GtkSwitchPrivate *priv = GTK_SWITCH (widget)->priv;
 
   gtk_widget_snapshot_child (widget, priv->on_label, snapshot);
   gtk_widget_snapshot_child (widget, priv->off_label, snapshot);
   gtk_widget_snapshot_child (widget, priv->slider, snapshot);
-
-  return FALSE;
-}
-
-static void
-gtk_switch_snapshot (GtkWidget   *widget,
-                     GtkSnapshot *snapshot)
-{
-  gtk_css_gadget_snapshot (GTK_SWITCH (widget)->priv->gadget, snapshot);
 }
 
 static void
@@ -813,7 +797,7 @@ gtk_switch_init (GtkSwitch *self)
                                                      GTK_WIDGET (self),
                                                      gtk_switch_get_content_size,
                                                      gtk_switch_allocate_contents,
-                                                     gtk_switch_snapshot_trough,
+                                                     NULL,
                                                      NULL,
                                                      NULL);
 


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