[clutter] BinLayout: Always use fixed_x/y for FIXED if set
- From: Alexander Larsson <alexl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [clutter] BinLayout: Always use fixed_x/y for FIXED if set
- Date: Thu, 7 Jun 2012 14:45:08 +0000 (UTC)
commit 76f1a42ef8eb1ff1cd29a4e1bf1393804d28de2a
Author: Alexander Larsson <alexl redhat com>
Date: Thu Jun 7 16:44:08 2012 +0200
BinLayout: Always use fixed_x/y for FIXED if set
We want to use the actually set value for x/y, not the current allocation,
as that might be a transition from an earlier allocation animation.
clutter/clutter-bin-layout.c | 14 +++++++++++---
1 files changed, 11 insertions(+), 3 deletions(-)
---
diff --git a/clutter/clutter-bin-layout.c b/clutter/clutter-bin-layout.c
index 9e83301..a1ff28a 100644
--- a/clutter/clutter-bin-layout.c
+++ b/clutter/clutter-bin-layout.c
@@ -454,7 +454,7 @@ clutter_bin_layout_allocate (ClutterLayoutManager *manager,
ClutterBinLayer *layer;
ClutterActorBox child_alloc = { 0, };
gdouble x_align, y_align;
- gboolean x_fill, y_fill;
+ gboolean x_fill, y_fill, is_set;
meta = clutter_layout_manager_get_child_meta (manager,
container,
@@ -462,12 +462,20 @@ clutter_bin_layout_allocate (ClutterLayoutManager *manager,
layer = CLUTTER_BIN_LAYER (meta);
if (layer->x_align == CLUTTER_BIN_ALIGNMENT_FIXED)
- child_alloc.x1 = clutter_actor_get_x (child);
+ {
+ g_object_get (child, "fixed-position-set", &is_set, "fixed-x", &child_alloc.x1, NULL);
+ if (!is_set)
+ child_alloc.x1 = clutter_actor_get_x (child);
+ }
else
child_alloc.x1 = allocation_x;
if (layer->y_align == CLUTTER_BIN_ALIGNMENT_FIXED)
- child_alloc.y1 = clutter_actor_get_y (child);
+ {
+ g_object_get (child, "fixed-position-set", &is_set, "fixed-y", &child_alloc.y1, NULL);
+ if (!is_set)
+ child_alloc.y1 = clutter_actor_get_y (child);
+ }
else
child_alloc.y1 = allocation_y;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]