[gnome-shell/wip/gdm-shell: 3/8] StBoxLayout: use adjustment value property, not getter



commit 4c6d2bb84543b13f45f3ff69e8bf8a2b5fc42a19
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]