[sushi/alex-changes: 5/11] Put all clutter actors in a common group



commit 715e3add54875b9629e244e02d8cc505b7ee8968
Author: Alexander Larsson <alexl redhat com>
Date:   Fri Apr 29 09:47:39 2011 +0200

    Put all clutter actors in a common group
    
    This lets us easily control things like overall alpha

 src/js/ui/mainWindow.js |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/src/js/ui/mainWindow.js b/src/js/ui/mainWindow.js
index 6e51ba9..84aba9d 100644
--- a/src/js/ui/mainWindow.js
+++ b/src/js/ui/mainWindow.js
@@ -65,6 +65,8 @@ MainWindow.prototype = {
                                                   green: 0,
                                                   blue: 0,
                                                   alpha: 255 }));
+        this._uiGroup =  new Clutter.Group();
+        this._stage.add_actor(this._uiGroup);
     },
 
     _connectStageSignals : function() {
@@ -88,7 +90,7 @@ MainWindow.prototype = {
             new Clutter.BindConstraint({ source: this._stage,
                                          coordinate: Clutter.BindCoordinate.SIZE }));
 
-        this._stage.add_actor(this._background);
+        this._uiGroup.add_actor(this._background);
         this._background.lower_bottom();
     },
 
@@ -239,7 +241,7 @@ MainWindow.prototype = {
         this._texture.add_constraint(this._textureYAlign);
 
         this.refreshSize();
-        this._stage.add_actor(this._texture);
+        this._uiGroup.add_actor(this._texture);
     },
 
     /**************************************************************************
@@ -388,7 +390,7 @@ MainWindow.prototype = {
             return;
 
         this._toolbarActor.set_reactive(true);
-        this._stage.add_actor(this._toolbarActor);
+        this._uiGroup.add_actor(this._toolbarActor);
 
         this._toolbarActor.add_constraint(
             new Clutter.AlignConstraint({ source: this._stage,
@@ -497,8 +499,8 @@ MainWindow.prototype = {
             new Clutter.AlignConstraint({ source: this._stage,
                                           factor: 1.0 }));
 
-        this._stage.add_actor(this._titleActor);
-        this._stage.add_actor(this._quitActor);
+        this._uiGroup.add_actor(this._titleActor);
+        this._uiGroup.add_actor(this._quitActor);
     },
 
     /**************************************************************************



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