[gnome-shell/T27795: 134/138] fixup! iconGrid: Add item nudge API



commit c11b95cea8e6b2d63a7e6a5a86d7b2904997bfab
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Mon Sep 30 21:55:06 2019 -0300

    fixup! iconGrid: Add item nudge API

 js/ui/iconGrid.js | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/js/ui/iconGrid.js b/js/ui/iconGrid.js
index 427e43ea00..a9532fa00b 100644
--- a/js/ui/iconGrid.js
+++ b/js/ui/iconGrid.js
@@ -738,7 +738,7 @@ var IconGrid = GObject.registerClass({
         if (dragLocation == DragLocation.EMPTY_AREA || dragLocation == DragLocation.ON_ICON)
             return;
 
-        let children = this.get_children().filter(c => c.is_visible());
+        let children = this._getVisibleChildren();
         let nudgeIndex = index;
         let rtl = (Clutter.get_default_text_direction() == Clutter.TextDirection.RTL);
 
@@ -758,9 +758,9 @@ var IconGrid = GObject.registerClass({
     }
 
     removeNudges() {
-        let children = this.get_children().filter(c => c.is_visible());
-        for (let index = 0; index < children.length; index++) {
-            this._animateNudge(children[index],
+        let children = this._getVisibleChildren();
+        for (let child of children) {
+            this._animateNudge(child,
                                NUDGE_RETURN_ANIMATION_TYPE,
                                NUDGE_RETURN_DURATION,
                                0);
@@ -771,11 +771,11 @@ var IconGrid = GObject.registerClass({
         if (!item)
             return;
 
-        item.save_easing_state();
-        item.set_easing_mode(animationType);
-        item.set_easing_duration(duration);
-        item.translation_x = offset;
-        item.restore_easing_state();
+        item.ease({
+            translation_x: offset,
+            duration: duration,
+            mode: animationType,
+        });
     }
 
     // This function is overriden by the PaginatedIconGrid subclass so we can


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]