[gnome-shell/wip/gdm-shell] 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] StBoxLayout: use adjustment value property, not getter
- Date: Thu, 7 Jul 2011 04:00:19 +0000 (UTC)
commit b1ba8c0958c4b4e9518c5daf9bd3178b6b9921ed
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
it breaks scroll animations.
This commit changes the code to use the "value" property instead
which always reflects reality.
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 0aa5ef2..3dbf533 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]