From 7d4ac04a78358f512e5723841e1f06a752129672 Mon Sep 17 00:00:00 2001 From: Georges Basile Stavracas Neto Date: Wed, 2 Dec 2020 18:35:38 -0300 Subject: [PATCH] appDisplay/baseAppView: Use a separate flag for animated indicators In the future, both AppDisplay and FolderView will be horizontal, and thus using the orientation to determine whether to use animated indicators won't be enough. Use a different flag to control that, and make FolderView not use animated page indicators. Part-of: --- js/ui/appDisplay.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js index a86f32a3b..71aee7bc3 100644 --- a/js/ui/appDisplay.js +++ b/js/ui/appDisplay.js @@ -127,6 +127,11 @@ var BaseAppView = GObject.registerClass({ }, }, class BaseAppView extends St.Widget { _init(params = {}, orientation = Clutter.Orientation.VERTICAL) { + params = Params.parse(params, { animateIndicators: true }, true); + + const animateIndicators = params.animateIndicators; + delete params.animateIndicators; + super._init(params); this._grid = this._createGrid(); @@ -160,7 +165,7 @@ var BaseAppView = GObject.registerClass({ }); // Page Indicators - if (vertical) + if (animateIndicators) this._pageIndicators = new PageIndicators.AnimatedPageIndicators(orientation); else this._pageIndicators = new PageIndicators.PageIndicators(orientation); @@ -1687,6 +1692,7 @@ class FolderView extends BaseAppView { layout_manager: new Clutter.BinLayout(), x_expand: true, y_expand: true, + animateIndicators: false, }, Clutter.Orientation.HORIZONTAL); // If it not expand, the parent doesn't take into account its preferred_width when allocating