diff options
author | Emmanuele Bassi <ebassi@gnome.org> | 2012-08-20 14:47:53 +0100 |
---|---|---|
committer | Emmanuele Bassi <ebassi@gnome.org> | 2012-08-20 14:50:39 +0100 |
commit | 8536314dbff5212e7afac29343ef67c46dfb30b2 (patch) | |
tree | b4b54ead0dd244881ed12703efbbc26068bfc2bf | |
parent | 044c04ea8bba9f4ca545fb0c76bf981f6bac7932 (diff) | |
download | clutter-8536314dbff5212e7afac29343ef67c46dfb30b2.tar.gz |
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
-rw-r--r-- | clutter/clutter-bin-layout.c | 12 |
1 files 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, |