[gnome-shell] iconGrid: Fix animation glitch



commit b4797956c7e7c0f98b8864e05adf6d3326e504ce
Author: Florian Müllner <fmuellner gnome org>
Date:   Tue Jun 18 20:50:42 2019 +0200

    iconGrid: Fix animation glitch
    
    Since commit 520cea93941b, the opacity of icon grid children is used
    both to skip children outside the current viewport and to hide the
    real icons while animating icon clones.
    
    As a result, a grid animation during an animation now ends up showing the
    icons that are being animated. Avoid that glitch by leaving children's
    opacity alone when there's an ongoing animation.
    
    https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/582

 js/ui/iconGrid.js | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/js/ui/iconGrid.js b/js/ui/iconGrid.js
index d428897a9e..a6774edb19 100644
--- a/js/ui/iconGrid.js
+++ b/js/ui/iconGrid.js
@@ -322,6 +322,7 @@ var IconGrid = GObject.registerClass({
                 leftEmptySpace = availWidth - usedWidth;
         }
 
+        let animating = this._clonesAnimating.length > 0;
         let x = box.x1 + leftEmptySpace + this.leftPadding;
         let y = box.y1 + this.topPadding;
         let columnIndex = 0;
@@ -333,7 +334,8 @@ var IconGrid = GObject.registerClass({
                 this._fillParent && childBox.y2 > availHeight - this.bottomPadding) {
                 children[i].opacity = 0;
             } else {
-                children[i].opacity = 255;
+                if (!animating)
+                    children[i].opacity = 255;
                 children[i].allocate(childBox, flags);
             }
 


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