messageTray: Don't animate notifications if they've shrunk.
The effect of the large gap breaks the illusion of the message attached to the bottom of the screen. https://bugzilla.gnome.org/show_bug.cgi?id=641570
This commit is contained in:
parent
c0739bd1e3
commit
0ae1556b94
@ -2013,7 +2013,13 @@ MessageTray.prototype = {
|
|||||||
|
|
||||||
_onNotificationExpanded: function() {
|
_onNotificationExpanded: function() {
|
||||||
let expandedY = this.actor.height - this._notificationBin.height;
|
let expandedY = this.actor.height - this._notificationBin.height;
|
||||||
if (this._notificationBin.y != expandedY)
|
|
||||||
|
// Don't animate the notification to its new position if it has shrunk:
|
||||||
|
// there will be a very visible "gap" that breaks the illusion.
|
||||||
|
|
||||||
|
if (this._notificationBin.y < expandedY)
|
||||||
|
this._notificationBin.y = expandedY;
|
||||||
|
else if (this._notification.y != expandedY)
|
||||||
this._tween(this._notificationBin, '_notificationState', State.SHOWN,
|
this._tween(this._notificationBin, '_notificationState', State.SHOWN,
|
||||||
{ y: expandedY,
|
{ y: expandedY,
|
||||||
time: ANIMATION_TIME,
|
time: ANIMATION_TIME,
|
||||||
|
Loading…
Reference in New Issue
Block a user