[gnome-shell] overview: set side controls visibility on view page change
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] overview: set side controls visibility on view page change
- Date: Thu, 14 Feb 2013 23:19:06 +0000 (UTC)
commit 5b39496008ab13bd16f840bc7e40bda106b11a2e
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Thu Jan 24 16:34:06 2013 -0500
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 files changed, 22 insertions(+), 0 deletions(-)
---
diff --git a/js/ui/overview.js b/js/ui/overview.js
index 7473431..adff625 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);
},
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]