[gnome-shell/wip/swarm: 26/36] viewSelector: Only animate with swarm on special cases
- From: Carlos Soriano <csoriano src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/swarm: 26/36] viewSelector: Only animate with swarm on special cases
- Date: Mon, 30 Jun 2014 12:31:25 +0000 (UTC)
commit b7b8503e26755289ef1091384c0daa2bee0c7e46
Author: Carlos Soriano <carlos soriano89 gmail com>
Date: Tue Jun 17 20:58:50 2014 +0200
viewSelector: Only animate with swarm on special cases
js/ui/viewSelector.js | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/js/ui/viewSelector.js b/js/ui/viewSelector.js
index 3e96469..15a4f65 100644
--- a/js/ui/viewSelector.js
+++ b/js/ui/viewSelector.js
@@ -228,10 +228,10 @@ const ViewSelector = new Lang.Class({
});
},
- _animateIn: function(page) {
+ _animateIn: function(page, oldPage) {
page.show();
- if (page == this._appsPage) {
+ if (page == this._appsPage && oldPage == this._workspacesPage) {
// Restore opacity of the page, since we could took the opacity
// on _fadePageIn if we didn't use swarm animation to animate out.
page.opacity = 255;
@@ -241,8 +241,8 @@ const ViewSelector = new Lang.Class({
}
},
- _animateOut: function(page, onComplete) {
- if (page == this._appsPage) {
+ _animateOut: function(page, newPage, onComplete) {
+ if (page == this._appsPage && newPage == this._workspacesPage) {
this.appDisplay.animate(IconGrid.ANIMATION_DIRECTION_OUT,
onComplete);
} else {
@@ -267,11 +267,11 @@ const ViewSelector = new Lang.Class({
let animateActivePage = Lang.bind(this,
function() {
this._hidePageAndSyncEmpty(oldPage);
- this._animateIn(this._activePage);
+ this._animateIn(page, oldPage);
});
if (oldPage && animateOut)
- this._animateOut(oldPage, animateActivePage)
+ this._animateOut(oldPage, page, animateActivePage)
else
animateActivePage();
},
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]