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: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1518>
This commit is contained in:
Georges Basile Stavracas Neto 2020-12-02 18:35:38 -03:00 committed by Marge Bot
parent 3f09876463
commit 7d4ac04a78

View File

@ -127,6 +127,11 @@ var BaseAppView = GObject.registerClass({
}, },
}, class BaseAppView extends St.Widget { }, class BaseAppView extends St.Widget {
_init(params = {}, orientation = Clutter.Orientation.VERTICAL) { _init(params = {}, orientation = Clutter.Orientation.VERTICAL) {
params = Params.parse(params, { animateIndicators: true }, true);
const animateIndicators = params.animateIndicators;
delete params.animateIndicators;
super._init(params); super._init(params);
this._grid = this._createGrid(); this._grid = this._createGrid();
@ -160,7 +165,7 @@ var BaseAppView = GObject.registerClass({
}); });
// Page Indicators // Page Indicators
if (vertical) if (animateIndicators)
this._pageIndicators = new PageIndicators.AnimatedPageIndicators(orientation); this._pageIndicators = new PageIndicators.AnimatedPageIndicators(orientation);
else else
this._pageIndicators = new PageIndicators.PageIndicators(orientation); this._pageIndicators = new PageIndicators.PageIndicators(orientation);
@ -1687,6 +1692,7 @@ class FolderView extends BaseAppView {
layout_manager: new Clutter.BinLayout(), layout_manager: new Clutter.BinLayout(),
x_expand: true, x_expand: true,
y_expand: true, y_expand: true,
animateIndicators: false,
}, Clutter.Orientation.HORIZONTAL); }, Clutter.Orientation.HORIZONTAL);
// If it not expand, the parent doesn't take into account its preferred_width when allocating // If it not expand, the parent doesn't take into account its preferred_width when allocating