Nicer animation of hidden windows when transitioning to/from the overview
Hidden windows used to appear/disappear abruptly in the beginning/end of the transition and the new animation is a lot smoother. https://bugzilla.gnome.org/show_bug.cgi?id=571109
This commit is contained in:
parent
648126e598
commit
be2801d1fa
@ -993,6 +993,26 @@ Workspace.prototype = {
|
|||||||
|
|
||||||
overlay.hide();
|
overlay.hide();
|
||||||
if (animate) {
|
if (animate) {
|
||||||
|
if (!metaWindow.showing_on_its_workspace()) {
|
||||||
|
/* Hidden windows should fade in and grow
|
||||||
|
* therefore we need to resize them now so they
|
||||||
|
* can be scaled up later */
|
||||||
|
if (workspaceZooming) {
|
||||||
|
clone.actor.opacity = 0;
|
||||||
|
clone.actor.scale_x = 0;
|
||||||
|
clone.actor.scale_y = 0;
|
||||||
|
clone.actor.x = x;
|
||||||
|
clone.actor.y = y;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Make the window slightly transparent to indicate it's hidden
|
||||||
|
Tweener.addTween(clone.actor,
|
||||||
|
{ opacity: 255,
|
||||||
|
time: Overview.ANIMATION_TIME,
|
||||||
|
transition: "easeInQuad"
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
Tweener.addTween(clone.actor,
|
Tweener.addTween(clone.actor,
|
||||||
{ x: x,
|
{ x: x,
|
||||||
y: y,
|
y: y,
|
||||||
@ -1162,6 +1182,8 @@ Workspace.prototype = {
|
|||||||
// Position and scale the windows.
|
// Position and scale the windows.
|
||||||
for (let i = 1; i < this._windows.length; i++) {
|
for (let i = 1; i < this._windows.length; i++) {
|
||||||
let clone = this._windows[i];
|
let clone = this._windows[i];
|
||||||
|
|
||||||
|
if (clone.metaWindow.showing_on_its_workspace()) {
|
||||||
Tweener.addTween(clone.actor,
|
Tweener.addTween(clone.actor,
|
||||||
{ x: clone.origX,
|
{ x: clone.origX,
|
||||||
y: clone.origY,
|
y: clone.origY,
|
||||||
@ -1172,6 +1194,17 @@ Workspace.prototype = {
|
|||||||
opacity: 255,
|
opacity: 255,
|
||||||
transition: "easeOutQuad"
|
transition: "easeOutQuad"
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
// The window is hidden, make it shrink and fade it out
|
||||||
|
Tweener.addTween(clone.actor,
|
||||||
|
{ scale_x: 0,
|
||||||
|
scale_y: 0,
|
||||||
|
opacity: 0,
|
||||||
|
workspace_relative: this,
|
||||||
|
time: Overview.ANIMATION_TIME,
|
||||||
|
transition: "easeOutQuad"
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this._visible = false;
|
this._visible = false;
|
||||||
|
Loading…
Reference in New Issue
Block a user