MessageTray: wait until the tray is hidden to switch styles

Switching style on Overview::hiding creates a weird effect, as the noise
texture is shown while the overview is still visibile. Instead, wait for
the tray to be fully hidden, then apply the new style.
As now the switch is invisible, there is no need for the transition
(which introduced the same problem on overview showing)

https://bugzilla.gnome.org/show_bug.cgi?id=689091
This commit is contained in:
Giovanni Campagna 2012-11-26 17:52:42 +01:00
parent 27ad8305e5
commit df2cab877f
2 changed files with 8 additions and 3 deletions

View File

@ -1313,7 +1313,6 @@ StScrollBar StButton#vhandle:active {
#message-tray { #message-tray {
background: #2e3436 url(message-tray-background.png); background: #2e3436 url(message-tray-background.png);
background-repeat: repeat; background-repeat: repeat;
transition-duration: 250ms;
height: 72px; height: 72px;
} }

View File

@ -1515,7 +1515,6 @@ const MessageTray = new Lang.Class({
function() { function() {
this._overviewVisible = false; this._overviewVisible = false;
this._escapeTray(); this._escapeTray();
this.actor.remove_style_pseudo_class('overview');
this._updateState(); this._updateState();
})); }));
@ -2190,7 +2189,9 @@ const MessageTray = new Lang.Class({
this._tween(this.actor, '_trayState', State.HIDDEN, this._tween(this.actor, '_trayState', State.HIDDEN,
{ y: 0, { y: 0,
time: ANIMATION_TIME, time: ANIMATION_TIME,
transition: 'easeOutQuad' transition: 'easeOutQuad',
onComplete: this._onTrayHidden,
onCompleteScope: this
}); });
// Note that we might have entered here without a grab, // Note that we might have entered here without a grab,
@ -2200,6 +2201,11 @@ const MessageTray = new Lang.Class({
this._lightbox.hide(); this._lightbox.hide();
}, },
_onTrayHidden: function() {
if (!this._overviewVisible)
this.actor.remove_style_pseudo_class('overview');
},
_hideDesktopClone: function(now) { _hideDesktopClone: function(now) {
this._tween(this._desktopClone, '_desktopCloneState', State.HIDDEN, this._tween(this._desktopClone, '_desktopCloneState', State.HIDDEN,
{ y: 0, { y: 0,