diff options
author | Matthias Clasen <mclasen@redhat.com> | 2021-01-15 22:35:11 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2021-01-15 22:35:11 -0500 |
commit | 144cf2d0405cde4a3c00069860bdbffec0f01c01 (patch) | |
tree | 3291fd2e26ce9a9f44df7f5803c3bcbc0daac126 | |
parent | e1a308d15104f60a168e62a14215496250300e29 (diff) | |
download | gtk+-144cf2d0405cde4a3c00069860bdbffec0f01c01.tar.gz |
overlaylayout: Set the child type in the class
We don't need to override create_layout_child here,
and setting the child type has the advantage that
the layout properties are showing up in the inspector.
-rw-r--r-- | gtk/gtkoverlaylayout.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/gtk/gtkoverlaylayout.c b/gtk/gtkoverlaylayout.c index 8795f96684..4642ea9675 100644 --- a/gtk/gtkoverlaylayout.c +++ b/gtk/gtkoverlaylayout.c @@ -432,25 +432,14 @@ gtk_overlay_layout_allocate (GtkLayoutManager *layout_manager, } } -static GtkLayoutChild * -gtk_overlay_layout_create_layout_child (GtkLayoutManager *manager, - GtkWidget *widget, - GtkWidget *for_child) -{ - return g_object_new (GTK_TYPE_OVERLAY_LAYOUT_CHILD, - "layout-manager", manager, - "child-widget", for_child, - NULL); -} - static void gtk_overlay_layout_class_init (GtkOverlayLayoutClass *klass) { GtkLayoutManagerClass *layout_class = GTK_LAYOUT_MANAGER_CLASS (klass); + layout_class->layout_child_type = GTK_TYPE_OVERLAY_LAYOUT_CHILD; layout_class->measure = gtk_overlay_layout_measure; layout_class->allocate = gtk_overlay_layout_allocate; - layout_class->create_layout_child = gtk_overlay_layout_create_layout_child; } static void |