[gtk/wip/baedert/box2: 6/12] combobox: Stop using GtkBox's pack-type property



commit 8db26672e9576cb3f03f11fefad9d0d6b2e2e7c5
Author: Timm Bäder <mail baedert org>
Date:   Wed Dec 26 08:34:47 2018 +0100

    combobox: Stop using GtkBox's pack-type property
    
    Reorder the child widgets accordingly instead.

 gtk/gtkcombobox.c     | 2 ++
 gtk/ui/gtkcombobox.ui | 6 ------
 2 files changed, 2 insertions(+), 6 deletions(-)
---
diff --git a/gtk/gtkcombobox.c b/gtk/gtkcombobox.c
index 153cdd4c5b..8adddcfe2f 100644
--- a/gtk/gtkcombobox.c
+++ b/gtk/gtkcombobox.c
@@ -1158,6 +1158,7 @@ gtk_combo_box_create_child (GtkComboBox *combo_box)
       gtk_cell_view_set_model (GTK_CELL_VIEW (priv->cell_view), priv->model);
       gtk_container_add (GTK_CONTAINER (gtk_widget_get_parent (priv->arrow)),
                          priv->cell_view);
+      gtk_box_reorder_child (GTK_BOX (gtk_widget_get_parent (priv->arrow)), priv->cell_view, 0);
       _gtk_bin_set_child (GTK_BIN (combo_box), priv->cell_view);
     }
 }
@@ -1193,6 +1194,7 @@ gtk_combo_box_add (GtkContainer *container,
 
   gtk_widget_set_hexpand (widget, TRUE);
   gtk_container_add (GTK_CONTAINER (priv->box), widget);
+  gtk_box_reorder_child (GTK_BOX (priv->box), widget, 0);
   _gtk_bin_set_child (GTK_BIN (container), widget);
 
   if (priv->has_entry)
diff --git a/gtk/ui/gtkcombobox.ui b/gtk/ui/gtkcombobox.ui
index cf6a81fd51..533a799c88 100644
--- a/gtk/ui/gtkcombobox.ui
+++ b/gtk/ui/gtkcombobox.ui
@@ -16,16 +16,10 @@
                   <object class="GtkIcon" id="arrow">
                     <property name="css-name">arrow</property>
                   </object>
-                  <packing>
-                    <property name="pack-type">end</property>
-                  </packing>
                 </child>
               </object>
             </child>
           </object>
-          <packing>
-            <property name="pack-type">end</property>
-          </packing>
         </child>
       </object>
     </child>


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