[gnome-shell/wip/message-tray] messageTray: Use a Lightbox to shade the rest of the uiGroup



commit 9aa374319a573318d0af01980f51fe7f18e78e14
Author: Debarshi Ray <debarshir gnome org>
Date:   Wed Aug 8 19:51:31 2012 +0200

    messageTray: Use a Lightbox to shade the rest of the uiGroup
    
    This is a visual indication of the fact that a grab is in place.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=681392

 js/ui/messageTray.js |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js
index 4c534bf..abe75e8 100644
--- a/js/ui/messageTray.js
+++ b/js/ui/messageTray.js
@@ -16,6 +16,7 @@ const St = imports.gi.St;
 const BoxPointer = imports.ui.boxpointer;
 const GnomeSession = imports.misc.gnomeSession;
 const GrabHelper = imports.ui.grabHelper;
+const Lightbox = imports.ui.lightbox;
 const Main = imports.ui.main;
 const PopupMenu = imports.ui.popupMenu;
 const Params = imports.misc.params;
@@ -1353,6 +1354,13 @@ const MessageTray = new Lang.Class({
         this._tweening = 0;
         this._windowsShifted = 0;
 
+        this._lightbox = new Lightbox.Lightbox(Main.uiGroup,
+                                               { inhibitEvents: true,
+                                                 fadeInTime: ANIMATION_TIME,
+                                                 fadeOutTime: ANIMATION_TIME
+                                               });
+        this._lightbox.highlight(this.actor);
+
         this._corner = new Clutter.Rectangle({ width: 1,
                                                height: 1,
                                                opacity: 0,
@@ -1787,6 +1795,8 @@ const MessageTray = new Lang.Class({
         this._desktopClone.y = 0;
         this._desktopClone.show();
 
+        this._lightbox.show();
+
         Tweener.addTween(this._desktopClone,
                          { y: this._desktopClone.y - this.actor.height,
                            time: ANIMATION_TIME,
@@ -1851,6 +1861,8 @@ const MessageTray = new Lang.Class({
                            })
                          });
         this._tweening++;
+
+        this._lightbox.hide();
     },
 
     _hideTray: function() {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]