mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-28 22:41:43 +00:00
box: Only emit pack-type notify if the pack type really changed
This is not very useful in itself, but the code reorg will be useful once we do style invalidation.
This commit is contained in:
parent
79de8e4d08
commit
bc9c43c1cb
12
gtk/gtkbox.c
12
gtk/gtkbox.c
@ -1612,11 +1612,13 @@ gtk_box_set_child_packing (GtkBox *box,
|
||||
gtk_widget_child_notify (child, "fill");
|
||||
child_info->padding = padding;
|
||||
gtk_widget_child_notify (child, "padding");
|
||||
if (pack_type == GTK_PACK_END)
|
||||
child_info->pack = GTK_PACK_END;
|
||||
else
|
||||
child_info->pack = GTK_PACK_START;
|
||||
gtk_widget_child_notify (child, "pack-type");
|
||||
if (pack_type != GTK_PACK_END)
|
||||
pack_type = GTK_PACK_START;
|
||||
if (child_info->pack_type != pack_type)
|
||||
{
|
||||
child_info->pack = GTK_PACK_END;
|
||||
gtk_widget_child_notify (child, "pack-type");
|
||||
}
|
||||
|
||||
if (gtk_widget_get_visible (child)
|
||||
&& gtk_widget_get_visible (GTK_WIDGET (box)))
|
||||
|
Loading…
Reference in New Issue
Block a user