Bug 582763 - Remove maximization effects
The maximize effect looked really ugly. In the absence of any cooler effects, none at all is better than what we have. Current compiz doesn't have one either. Note that in the future when we merge the frame into the panel in the maximize case, we may want an effect for that.
This commit is contained in:
parent
ea4ea4a9b2
commit
f097304f3b
@ -145,50 +145,13 @@ WindowManager.prototype = {
|
||||
},
|
||||
|
||||
_maximizeWindow : function(actor, targetX, targetY, targetWidth, targetHeight) {
|
||||
if (!this._shouldAnimate(actor)) {
|
||||
this._shellwm.completed_maximize(actor);
|
||||
return;
|
||||
}
|
||||
|
||||
/* this doesn't work very well, as simply scaling up the existing
|
||||
* window contents doesn't produce anything like the same results as
|
||||
* actually maximizing the window.
|
||||
*/
|
||||
let scaleX = targetWidth / actor.width;
|
||||
let scaleY = targetHeight / actor.height;
|
||||
let anchorX = (actor.x - targetX) * actor.width/(targetWidth - actor.width);
|
||||
let anchorY = (actor.y - targetY) * actor.height/(targetHeight - actor.height);
|
||||
|
||||
actor.move_anchor_point(anchorX, anchorY);
|
||||
|
||||
this._maximizing.push(actor);
|
||||
Tweener.addTween(actor,
|
||||
{ scale_x: scaleX,
|
||||
scale_y: scaleY,
|
||||
time: WINDOW_ANIMATION_TIME,
|
||||
transition: "easeOutQuad",
|
||||
onComplete: this._maximizeWindowDone,
|
||||
onCompleteScope: this,
|
||||
onCompleteParams: [actor],
|
||||
onOverwrite: this._maximizeWindowOverwrite,
|
||||
onOverwriteScope: this,
|
||||
onOverwriteParams: [actor]
|
||||
});
|
||||
},
|
||||
|
||||
_maximizeWindowDone : function(actor) {
|
||||
if (this._removeEffect(this._maximizing, actor)) {
|
||||
Tweener.removeTweens(actor);
|
||||
actor.set_scale(1.0, 1.0);
|
||||
actor.move_anchor_point_from_gravity(Clutter.Gravity.NORTH_WEST);
|
||||
this._shellwm.completed_maximize(actor);
|
||||
}
|
||||
},
|
||||
|
||||
_maximizeWindowOverwrite : function(actor) {
|
||||
if (this._removeEffect(this._maximizing, actor)) {
|
||||
this._shellwm.completed_maximize(actor);
|
||||
}
|
||||
},
|
||||
|
||||
_unmaximizeWindow : function(actor, targetX, targetY, targetWidth, targetHeight) {
|
||||
|
Loading…
Reference in New Issue
Block a user