headerbar: Fix end-packed child order
authorTimm Bäder <mail@baedert.org>
Sat, 21 Sep 2019 07:41:53 +0000 (09:41 +0200)
committerTimm Bäder <mail@baedert.org>
Sat, 21 Sep 2019 07:41:53 +0000 (09:41 +0200)
We pack from right to left there.

gtk/gtkheaderbar.c

index 90c6871fd4b22a1637b075857a6c518fbe23a114..7141a2d300dc7f146cced0c895f2ae0cec18d2f4 100644 (file)
@@ -944,9 +944,14 @@ gtk_header_bar_pack (GtkHeaderBar *bar,
   g_return_if_fail (gtk_widget_get_parent (widget) == NULL);
 
   if (pack_type == GTK_PACK_START)
-    gtk_container_add (GTK_CONTAINER (priv->start_box), widget);
+    {
+      gtk_container_add (GTK_CONTAINER (priv->start_box), widget);
+    }
   else if (pack_type == GTK_PACK_END)
-    gtk_container_add (GTK_CONTAINER (priv->end_box), widget);
+    {
+      gtk_container_add (GTK_CONTAINER (priv->end_box), widget);
+      gtk_box_reorder_child_after (GTK_BOX (priv->end_box), widget, NULL);
+    }
 
   g_signal_connect (widget, "notify::visible", G_CALLBACK (notify_child_cb), bar);
   _gtk_header_bar_update_separator_visibility (bar);