[cheese] Moved from Mx.Grid to Mx.Table to make transition to Clutter.Table easier



commit 7b08ae918d80526794e57d833e4b91b44f48e812
Author: Yuvaraj Pandian T <yuvipanda gmail com>
Date:   Mon Oct 4 01:08:22 2010 +0530

    Moved from Mx.Grid to Mx.Table to make transition to Clutter.Table easier

 src/cheese-window.vala |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)
---
diff --git a/src/cheese-window.vala b/src/cheese-window.vala
index a1704a6..8f32207 100644
--- a/src/cheese-window.vala
+++ b/src/cheese-window.vala
@@ -68,9 +68,9 @@ public class Cheese.MainWindow : Gtk.Window
   private Clutter.Rectangle background_layer;
   private Clutter.Text      error_layer;
 
-  private Mx.Grid            current_effects_grid;
+  private Mx.Table            current_effects_grid;
   private int                current_effects_page = 0;
-  private ArrayList<Mx.Grid> effects_grids;
+  private ArrayList<Mx.Table> effects_grids;
 
   private Gtk.Action       take_photo_action;
   private Gtk.Action       take_video_action;
@@ -851,7 +851,7 @@ public class Cheese.MainWindow : Gtk.Window
       effects_manager = new EffectsManager ();
       effects_manager.load_effects ();
 
-      effects_grids = new ArrayList<Mx.Grid>();
+      effects_grids = new ArrayList<Mx.Table>();
 
       if (effects_manager.effects.size == 0)
       {
@@ -860,14 +860,9 @@ public class Cheese.MainWindow : Gtk.Window
 
       for (int i = 0; i <= effects_manager.effects.size / EFFECTS_PER_PAGE; i++)
       {
-        Mx.Grid grid = new Mx.Grid ();
+        Mx.Table grid = new Mx.Table ();
         effects_grids.add (grid);
 
-        grid.line_alignment = Mx.Align.MIDDLE;
-        grid.child_x_align  = Mx.Align.MIDDLE;
-        grid.child_y_align  = Mx.Align.MIDDLE;
-        grid.orientation    = Mx.Orientation.VERTICAL;
-
         grid.column_spacing = 20;
         grid.row_spacing    = 20;
       }
@@ -912,7 +907,12 @@ public class Cheese.MainWindow : Gtk.Window
                   "y-align", Clutter.BinAlignment.END, null
                   );
 
-        effects_grids[i / EFFECTS_PER_PAGE].add ((Clutter.Actor)box);
+        effects_grids[i / EFFECTS_PER_PAGE].add_actor_with_properties ((Clutter.Actor)box,
+																	   (i % EFFECTS_PER_PAGE) % 3,
+																	   (i % EFFECTS_PER_PAGE) / 3,
+																	   "x-fill", true,
+																	   "y-fill", true
+			);
       }
 
       setup_effects_page_switch_sensitivity ();



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