[gnome-shell/wip/jimmac/dash-icon-spacing: 59/72] appDisplay: Never use animated indicators




commit b5ec8f3209b2e07b8cc7e74453214ded57ada6e6
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Fri Jan 8 18:23:51 2021 -0300

    appDisplay: Never use animated indicators
    
    The app grid itself now is horizontal, and is displayed beneath
    workspaces, above the app grid. This makes the indicator animations
    out of place, as they're not coming from the edge anymore.
    
    Use PageIndicators for both FolderView and AppDisplay.

 js/ui/appDisplay.js | 23 ++++-------------------
 1 file changed, 4 insertions(+), 19 deletions(-)
---
diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js
index 61a563843d..9fc272661d 100644
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@ -127,11 +127,6 @@ var BaseAppView = GObject.registerClass({
     },
 }, class BaseAppView extends St.Widget {
     _init(params = {}) {
-        params = Params.parse(params, { animateIndicators: true }, true);
-
-        const animateIndicators = params.animateIndicators;
-        delete params.animateIndicators;
-
         super._init(params);
 
         this._grid = this._createGrid();
@@ -169,11 +164,8 @@ var BaseAppView = GObject.registerClass({
         });
 
         // Page Indicators
-        const orientation = Clutter.Orientation.HORIZONTAL;
-        if (animateIndicators)
-            this._pageIndicators = new PageIndicators.AnimatedPageIndicators(orientation);
-        else
-            this._pageIndicators = new PageIndicators.PageIndicators(orientation);
+        this._pageIndicators =
+            new PageIndicators.PageIndicators(Clutter.Orientation.HORIZONTAL);
 
         this._pageIndicators.y_expand = false;
         this._pageIndicators.connect('page-activated',
@@ -1226,13 +1218,10 @@ class AppDisplay extends BaseAppView {
         };
 
         if (animationDirection == IconGrid.AnimationDirection.OUT &&
-            this._displayingDialog && this._currentDialog) {
+            this._displayingDialog && this._currentDialog)
             this._currentDialog.popdown();
-        } else {
+        else
             super.animate(animationDirection, completionFunc);
-            if (animationDirection == IconGrid.AnimationDirection.OUT)
-                this._pageIndicators.animateIndicators(animationDirection);
-        }
     }
 
     animateSwitch(animationDirection) {
@@ -1247,9 +1236,6 @@ class AppDisplay extends BaseAppView {
                 onComplete: () => (this.opacity = 255),
             });
         }
-
-        if (animationDirection == IconGrid.AnimationDirection.OUT)
-            this._pageIndicators.animateIndicators(animationDirection);
     }
 
     goToPage(pageNumber, animate = true) {
@@ -1734,7 +1720,6 @@ class FolderView extends BaseAppView {
             layout_manager: new Clutter.BinLayout(),
             x_expand: true,
             y_expand: true,
-            animateIndicators: false,
         });
 
         // If it not expand, the parent doesn't take into account its preferred_width when allocating


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