[gnome-shell/gbsneto/icon-grid-dnd] iconGrid: Implicitly animate icon positions



commit a09e8add603d51de381fb152c26d1903558abe5f
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Mon Jul 1 23:25:19 2019 -0300

    iconGrid: Implicitly animate icon positions
    
    Add a proper easing state, and animate icon positions using
    Clutter implicit animations.
    
    https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/603

 js/ui/iconGrid.js | 9 +++++++++
 1 file changed, 9 insertions(+)
---
diff --git a/js/ui/iconGrid.js b/js/ui/iconGrid.js
index 3ea739d2a..0cbb8e221 100644
--- a/js/ui/iconGrid.js
+++ b/js/ui/iconGrid.js
@@ -340,7 +340,11 @@ var IconGrid = GObject.registerClass({
             } else {
                 if (!animating)
                     children[i].opacity = 255;
+
+                children[i].save_easing_state();
+                children[i].set_easing_mode(Clutter.AnimationMode.EASE_OUT_QUAD);
                 children[i].allocate(childBox, flags);
+                children[i].restore_easing_state();
             }
 
             columnIndex++;
@@ -826,7 +830,12 @@ var PaginatedIconGrid = GObject.registerClass({
 
         for (let i = 0; i < children.length; i++) {
             let childBox = this._calculateChildBox(children[i], x, y, box);
+
+            children[i].save_easing_state();
+            children[i].set_easing_mode(Clutter.AnimationMode.EASE_OUT_QUAD);
             children[i].allocate(childBox, flags);
+            children[i].restore_easing_state();
+
             children[i].show();
 
             columnIndex++;


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