[gnome-documents/gnome-3-4] toolbar: use a ClutterBoxLayout inside MainToolbar



commit 664e60766c89cb23ceea00f12fb820bc780579b7
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Mon May 14 11:53:06 2012 -0400

    toolbar: use a ClutterBoxLayout inside MainToolbar
    
    Right now, just pack the GtkClutterActor inside it.

 src/mainToolbar.js |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/src/mainToolbar.js b/src/mainToolbar.js
index b8c4e88..cee3e31 100644
--- a/src/mainToolbar.js
+++ b/src/mainToolbar.js
@@ -19,6 +19,7 @@
  *
  */
 
+const Clutter = imports.gi.Clutter;
 const Gd = imports.gi.Gd;
 const Gio = imports.gi.Gio;
 const GLib = imports.gi.GLib;
@@ -51,7 +52,12 @@ MainToolbar.prototype = {
         this.widget.get_style_context().add_class(Gtk.STYLE_CLASS_MENUBAR);
         this.widget.show();
 
-        this.actor = new GtkClutter.Actor({ contents: this.widget });
+        this.layout = new Clutter.BoxLayout({ vertical: true });
+        this.actor = new Clutter.Actor({ layout_manager: this.layout });
+
+        this.layout.pack(new GtkClutter.Actor({ contents: this.widget }),
+                         false, true, false,
+                         Clutter.BoxAlignment.CENTER, Clutter.BoxAlignment.START);
 
         // setup listeners to mode changes that affect the toolbar layout
         this._searchStringId =



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