[gnome-shell/wip/gdm-shell: 5/16] StBoxLayout: Use adjustment value property, not getter
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/gdm-shell: 5/16] StBoxLayout: Use adjustment value property, not getter
- Date: Wed, 24 Aug 2011 15:10:25 +0000 (UTC)
commit 69c3f6a623a66fa582f9cca32ed78ca513199f0e
Author: Ray Strode <rstrode redhat com>
Date: Wed Jul 6 23:55:32 2011 -0400
StBoxLayout: Use adjustment value property, not getter
The getter ignores intermediate values during interpolation, so using
the former breaks the StAdjustments built-in animation features.
This commit changes the code to use the "value" property instead
which always reflects the current state of the adjustment value,
even during interpolation.
src/st/st-box-layout.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/st/st-box-layout.c b/src/st/st-box-layout.c
index 9668f13..156ac8c 100644
--- a/src/st/st-box-layout.c
+++ b/src/st/st-box-layout.c
@@ -864,12 +864,12 @@ st_box_layout_apply_transform (ClutterActor *a,
CLUTTER_ACTOR_CLASS (st_box_layout_parent_class)->apply_transform (a, m);
if (priv->hadjustment)
- x = st_adjustment_get_value (priv->hadjustment);
+ g_object_get (G_OBJECT (priv->hadjustment), "value", &x, NULL);
else
x = 0;
if (priv->vadjustment)
- y = st_adjustment_get_value (priv->vadjustment);
+ g_object_get (G_OBJECT (priv->vadjustment), "value", &y, NULL);
else
y = 0;
@@ -886,12 +886,12 @@ get_border_paint_offsets (StBoxLayout *self,
StBoxLayoutPrivate *priv = self->priv;
if (priv->hadjustment)
- *x = st_adjustment_get_value (priv->hadjustment);
+ g_object_get (G_OBJECT (priv->hadjustment), "value", x, NULL);
else
*x = 0;
if (priv->vadjustment)
- *y = st_adjustment_get_value (priv->vadjustment);
+ g_object_get (G_OBJECT (priv->vadjustment), "value", y, NULL);
else
*y = 0;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]