[gtk+/wip/baedert/drawing] Remove last gadget usages



commit de4f5136ea61dbfa515f98804d49576b48a0432c
Author: Timm Bäder <mail baedert org>
Date:   Thu May 4 18:26:38 2017 +0200

    Remove last gadget usages
    
    And fix the clip calculation

 gtk/gtkmodelbutton.c |   12 ++----------
 1 files changed, 2 insertions(+), 10 deletions(-)
---
diff --git a/gtk/gtkmodelbutton.c b/gtk/gtkmodelbutton.c
index 94de8d9..3ae4ca3 100644
--- a/gtk/gtkmodelbutton.c
+++ b/gtk/gtkmodelbutton.c
@@ -154,7 +154,6 @@ struct _GtkModelButton
   GtkWidget *box;
   GtkWidget *image;
   GtkWidget *label;
-  GtkCssGadget *gadget;
   GtkCssGadget *indicator_gadget;
   gboolean active;
   gboolean centered;
@@ -806,6 +805,7 @@ gtk_model_button_size_allocate (GtkWidget     *widget,
                                &child_allocation,
                                gtk_widget_get_allocated_baseline (widget),
                                &check_clip);
+      gdk_rectangle_union (&clip, &check_clip, &clip);
 
       if (child && gtk_widget_get_visible (child))
         {
@@ -850,7 +850,7 @@ gtk_model_button_size_allocate (GtkWidget     *widget,
         }
 
       gtk_container_get_children_clip (GTK_CONTAINER (widget), &child_clip);
-      gdk_rectangle_union (&clip, &check_clip, &clip);
+      gdk_rectangle_union (&clip, &child_clip, &clip);
 
       gtk_widget_set_clip (widget, &clip);
     }
@@ -918,7 +918,6 @@ gtk_model_button_finalize (GObject *object)
   GtkModelButton *button = GTK_MODEL_BUTTON (object);
 
   g_clear_object (&button->indicator_gadget);
-  /*g_clear_object (&button->gadget);*/
 
   G_OBJECT_CLASS (gtk_model_button_parent_class)->finalize (object);
 }
@@ -1089,13 +1088,6 @@ gtk_model_button_init (GtkModelButton *button)
   gtk_container_add (GTK_CONTAINER (button), button->box);
 
   widget_node = gtk_widget_get_css_node (GTK_WIDGET (button));
-  button->gadget = gtk_css_custom_gadget_new_for_node (widget_node,
-                                                       GTK_WIDGET (button),
-                                                       NULL,
-                                                       NULL,
-                                                       NULL,
-                                                       NULL,
-                                                       NULL);
   button->indicator_gadget = gtk_builtin_icon_new ("check",
                                                    GTK_WIDGET (button),
                                                    NULL,


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