From 5b39496008ab13bd16f840bc7e40bda106b11a2e Mon Sep 17 00:00:00 2001 From: Cosimo Cecchi Date: Thu, 24 Jan 2013 16:34:06 -0500 Subject: [PATCH] overview: set side controls visibility on view page change For now use the same behavior as before - hide the workspace thumbnails when showing the applications page. https://bugzilla.gnome.org/show_bug.cgi?id=682050 --- js/ui/overview.js | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/js/ui/overview.js b/js/ui/overview.js index 747343163..adff62518 100644 --- a/js/ui/overview.js +++ b/js/ui/overview.js @@ -257,10 +257,32 @@ const Overview = new Lang.Class({ y_fill: true }); this._overview.add_actor(this._messageTrayGhost); + this._viewSelector.connect('page-changed', Lang.bind(this, + function() { + this._setSideControlsVisibility(); + })); + Main.layoutManager.connect('monitors-changed', Lang.bind(this, this._relayout)); this._relayout(); }, + _setSideControlsVisibility: function() { + // Ignore the case when we're leaving the overview, since + // actors will be made visible again when entering the overview + // next time, and animating them while doing so is just + // unnecesary noise + if (!this.visible || this._hideInProgress) + return; + + let activePage = this._viewSelector.getActivePage(); + let thumbnailsVisible = (activePage == ViewSelector.ViewPage.WINDOWS); + + if (thumbnailsVisible) + this._thumbnailsSlider.slideIn(); + else + this._thumbnailsSlider.slideOut(); + }, + addSearchProvider: function(provider) { this._viewSelector.addSearchProvider(provider); },