[gnome-shell/gnome-3-6] MessageTray: restore opacity when expanding a notification
- From: Florian MÃllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/gnome-3-6] MessageTray: restore opacity when expanding a notification
- Date: Tue, 12 Feb 2013 14:47:55 +0000 (UTC)
commit c3706faeb6b79d69f46783513daa95dda79d350c
Author: Giovanni Campagna <gcampagna src gnome org>
Date: Mon Nov 19 18:59:39 2012 +0100
MessageTray: restore opacity when expanding a notification
MessageTray tweens both opacity and y to hide or show _notificationWidget,
but only y when expanding it. This means that an existing tween to hide
the notification will continue running, clearing the notification state.
If the hiding one completes before the showing one, the onComplete handler
will throw an exception (because the notification was nullified) and
therefore break the state tracking.
https://bugzilla.gnome.org/show_bug.cgi?id=683986
js/ui/messageTray.js | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js
index 71ebb29..7079c19 100644
--- a/js/ui/messageTray.js
+++ b/js/ui/messageTray.js
@@ -2353,8 +2353,13 @@ const MessageTray = new Lang.Class({
if (this._notificationWidget.y < expandedY) {
this._notificationWidget.y = expandedY;
} else if (this._notification.y != expandedY) {
+ // Tween also opacity here, to override a possible tween that's
+ // currently hiding the notification. This will ensure that the
+ // notification is not removed when the onComplete handler for this
+ // one triggers.
this._tween(this._notificationWidget, '_notificationState', State.SHOWN,
{ y: expandedY,
+ opacity: 255,
time: ANIMATION_TIME,
transition: 'easeOutQuad'
});
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]