overview: hide side controls when searching
Hide the elements when the search is active. Show them if the search is cancelled. https://bugzilla.gnome.org/show_bug.cgi?id=682050
This commit is contained in:
parent
53cff07eef
commit
09e7ab5611
@ -268,10 +268,44 @@ const Overview = new Lang.Class({
|
|||||||
y_fill: true });
|
y_fill: true });
|
||||||
this._overview.add_actor(this._messageTrayGhost);
|
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));
|
Main.layoutManager.connect('monitors-changed', Lang.bind(this, this._relayout));
|
||||||
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.animationInProgress)
|
||||||
|
return;
|
||||||
|
|
||||||
|
let searchActive = this._viewSelector.getSearchActive();
|
||||||
|
let dashVisible = !searchActive;
|
||||||
|
let thumbnailsVisible = !searchActive;
|
||||||
|
let trayVisible = !searchActive;
|
||||||
|
|
||||||
|
if (dashVisible)
|
||||||
|
this._dash.show();
|
||||||
|
else
|
||||||
|
this._dash.hide();
|
||||||
|
|
||||||
|
if (thumbnailsVisible)
|
||||||
|
this._thumbnailsBox.show();
|
||||||
|
else
|
||||||
|
this._thumbnailsBox.hide();
|
||||||
|
|
||||||
|
if (trayVisible)
|
||||||
|
Main.messageTray.show();
|
||||||
|
else
|
||||||
|
Main.messageTray.hide();
|
||||||
|
},
|
||||||
|
|
||||||
addSearchProvider: function(provider) {
|
addSearchProvider: function(provider) {
|
||||||
this._viewSelector.addSearchProvider(provider);
|
this._viewSelector.addSearchProvider(provider);
|
||||||
},
|
},
|
||||||
|
@ -207,6 +207,7 @@ const ViewSelector = new Lang.Class({
|
|||||||
function() {
|
function() {
|
||||||
this._activePage.hide();
|
this._activePage.hide();
|
||||||
this._activePage = page;
|
this._activePage = page;
|
||||||
|
this.emit('page-changed');
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -468,6 +469,10 @@ const ViewSelector = new Lang.Class({
|
|||||||
removeSearchProvider: function(provider) {
|
removeSearchProvider: function(provider) {
|
||||||
this._searchSystem.unregisterProvider(provider);
|
this._searchSystem.unregisterProvider(provider);
|
||||||
this._searchResults.destroyProviderMeta(provider);
|
this._searchResults.destroyProviderMeta(provider);
|
||||||
|
},
|
||||||
|
|
||||||
|
getSearchActive: function() {
|
||||||
|
return this._searchActive;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
Signals.addSignalMethods(ViewSelector.prototype);
|
Signals.addSignalMethods(ViewSelector.prototype);
|
||||||
|
Loading…
Reference in New Issue
Block a user