[gnome-games/gsoc-seed-games] [same-gnome-clutter] Finish (not yet animated) live theme switching



commit d36636405687b96fa1033b892e8d3c379434e5b0
Author: Tim Horton <hortont424 gmail com>
Date:   Sun Jul 12 21:27:27 2009 -0400

    [same-gnome-clutter] Finish (not yet animated) live theme switching

 configure.in                    |    1 +
 same-gnome-clutter/src/Light.js |    7 +++++--
 2 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/configure.in b/configure.in
index 257e165..8bb1311 100644
--- a/configure.in
+++ b/configure.in
@@ -1090,6 +1090,7 @@ gnomine/gnomine.desktop.in
 same-gnome-clutter/Makefile
 same-gnome-clutter/data/themes/Makefile
 same-gnome-clutter/data/themes/tango/Makefile
+same-gnome-clutter/data/themes/test/Makefile
 same-gnome-clutter/same-gnome-clutter
 same-gnome-clutter/same-gnome-clutter.desktop.in
 same-gnome-clutter/same-gnome-clutter-c.desktop.in
diff --git a/same-gnome-clutter/src/Light.js b/same-gnome-clutter/src/Light.js
index 0eb0cb4..b756b2b 100644
--- a/same-gnome-clutter/src/Light.js
+++ b/same-gnome-clutter/src/Light.js
@@ -6,7 +6,7 @@ Settings = imports.Settings;
 Light = new GType({
     parent: Clutter.Group.type,
     name: "Light",
-    init: function()
+    init: function(self)
     {
 	// Private
 	var closed = false;
@@ -15,7 +15,10 @@ Light = new GType({
 	
 	function theme_changed()
 	{
-		on.source = Settings.theme.colors[state];
+		self.remove_actor(self.on);
+		self.on = new Clutter.Clone({source: Settings.theme.colors[state]});
+		self.on.set_size(main.tile_size, main.tile_size);	
+		self.add_actor(self.on);
 	}
 		
 	// Public



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