[clutter] bin-layout: Ensure that fixed position get a 0.0 alignment
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [clutter] bin-layout: Ensure that fixed position get a 0.0 alignment
- Date: Mon, 20 Aug 2012 14:00:19 +0000 (UTC)
commit 8536314dbff5212e7afac29343ef67c46dfb30b2
Author: Emmanuele Bassi <ebassi gnome org>
Date: Mon Aug 20 14:47:53 2012 +0100
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 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/clutter/clutter-bin-layout.c b/clutter/clutter-bin-layout.c
index b79082b..ec9dbc1 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,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]