From 8536314dbff5212e7afac29343ef67c46dfb30b2 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Mon, 20 Aug 2012 14:47:53 +0100 Subject: [PATCH] bin-layout: Ensure that fixed position get a 0.0 alignment If the actor has a fixed position set, but it's not using the BinLayout alignment enumeration to set its alignment, then we force the alignment factor to 0.0; this is consistent with what happens with an explicit alignment of CLUTTER_BIN_ALIGNMENT_FIXED. https://bugzilla.gnome.org/show_bug.cgi?id=682265 --- clutter/clutter-bin-layout.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/clutter/clutter-bin-layout.c b/clutter/clutter-bin-layout.c index b79082b31..ec9dbc192 100644 --- a/clutter/clutter-bin-layout.c +++ b/clutter/clutter-bin-layout.c @@ -504,7 +504,11 @@ clutter_bin_layout_allocate (ClutterLayoutManager *manager, else { x_fill = (layer->x_align == CLUTTER_BIN_ALIGNMENT_FILL); - x_align = get_bin_alignment_factor (layer->x_align); + + if (!is_fixed_position_set) + x_align = get_bin_alignment_factor (layer->x_align); + else + x_align = 0.0; } if (clutter_actor_needs_expand (child, CLUTTER_ORIENTATION_VERTICAL)) @@ -518,7 +522,11 @@ clutter_bin_layout_allocate (ClutterLayoutManager *manager, else { y_fill = (layer->y_align == CLUTTER_BIN_ALIGNMENT_FILL); - y_align = get_bin_alignment_factor (layer->y_align); + + if (!is_fixed_position_set) + y_align = get_bin_alignment_factor (layer->y_align); + else + y_align = 0.0; } clutter_actor_allocate_align_fill (child, &child_alloc,