[gnome-shell] MessageTray: restore opacity when expanding a notification
- From: Giovanni Campagna <gcampagna src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] MessageTray: restore opacity when expanding a notification
- Date: Mon, 19 Nov 2012 18:21:05 +0000 (UTC)
commit b121c2518403bc5ea991b3f1c4b00188c8d590b4
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 50fd3b4..d69d31b 100644
--- a/js/ui/messageTray.js
+++ b/js/ui/messageTray.js
@@ -2403,8 +2403,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]