mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-28 14:31:10 +00:00
scalebutton: Stop relying on GtkBox's pack-type child prop
This commit is contained in:
parent
bd71e744d2
commit
d7756dc62b
@ -724,18 +724,20 @@ apply_orientation (GtkScaleButton *button,
|
||||
{
|
||||
priv->applied_orientation = orientation;
|
||||
gtk_orientable_set_orientation (GTK_ORIENTABLE (priv->box), orientation);
|
||||
gtk_container_child_set (GTK_CONTAINER (priv->box),
|
||||
priv->plus_button,
|
||||
"pack-type",
|
||||
orientation == GTK_ORIENTATION_VERTICAL ?
|
||||
GTK_PACK_START : GTK_PACK_END,
|
||||
NULL);
|
||||
gtk_container_child_set (GTK_CONTAINER (priv->box),
|
||||
priv->minus_button,
|
||||
"pack-type",
|
||||
orientation == GTK_ORIENTATION_VERTICAL ?
|
||||
GTK_PACK_END : GTK_PACK_START,
|
||||
NULL);
|
||||
|
||||
if (orientation == GTK_ORIENTATION_HORIZONTAL)
|
||||
{
|
||||
gtk_box_reorder_child (GTK_BOX (priv->box), priv->scale, 0);
|
||||
gtk_box_reorder_child (GTK_BOX (priv->box), priv->minus_button, 1);
|
||||
gtk_box_reorder_child (GTK_BOX (priv->box), priv->plus_button, 2);
|
||||
}
|
||||
else
|
||||
{
|
||||
gtk_box_reorder_child (GTK_BOX (priv->box), priv->scale, 1);
|
||||
gtk_box_reorder_child (GTK_BOX (priv->box), priv->minus_button, 2);
|
||||
gtk_box_reorder_child (GTK_BOX (priv->box), priv->plus_button, 0);
|
||||
|
||||
}
|
||||
|
||||
gtk_orientable_set_orientation (GTK_ORIENTABLE (priv->scale), orientation);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user