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



commit 2313851ecd3058341c35e1aa0f6f0087ccf25096
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 926d2a1..35a9531 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;
@@ -1351,6 +1352,13 @@ const MessageTray = new Lang.Class({
         this._inFullscreen = false;
         this._desktopClone = null;
 
+        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,
@@ -1774,6 +1782,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,
@@ -1816,6 +1826,8 @@ const MessageTray = new Lang.Class({
                                                            geometry.height + progress);
                            })
                          });
+
+        this._lightbox.hide();
     },
 
     _hideTray: function() {



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