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,16 +1182,29 @@ 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];
|
||||||
Tweener.addTween(clone.actor,
|
|
||||||
{ x: clone.origX,
|
if (clone.metaWindow.showing_on_its_workspace()) {
|
||||||
y: clone.origY,
|
Tweener.addTween(clone.actor,
|
||||||
scale_x: 1.0,
|
{ x: clone.origX,
|
||||||
scale_y: 1.0,
|
y: clone.origY,
|
||||||
workspace_relative: this,
|
scale_x: 1.0,
|
||||||
time: Overview.ANIMATION_TIME,
|
scale_y: 1.0,
|
||||||
opacity: 255,
|
workspace_relative: this,
|
||||||
transition: "easeOutQuad"
|
time: Overview.ANIMATION_TIME,
|
||||||
});
|
opacity: 255,
|
||||||
|
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