[sushi] image: rework toolbar rendering not to hardcode size



commit 3c9a0fe3431722df8d5efb3cb815e77ac985d0c9
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Tue May 10 13:30:07 2011 -0400

    image: rework toolbar rendering not to hardcode size
    
    And only start showing the toolbar when the image loading is complete.

 src/js/viewers/image.js |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/src/js/viewers/image.js b/src/js/viewers/image.js
index 7e6960b..5bf0b20 100644
--- a/src/js/viewers/image.js
+++ b/src/js/viewers/image.js
@@ -87,6 +87,8 @@ ImageRenderer.prototype = {
 
                  this._group.add_actor(this._texture);
                  this._spinnerActor.destroy();
+
+                 this._toolbarActor.show();
              } catch(e) {
              }}));
     },
@@ -105,15 +107,13 @@ ImageRenderer.prototype = {
     },
 
     createToolbar : function() {
-        this._mainToolbar = new Gtk.Toolbar();
+        this._mainToolbar = new Gtk.Toolbar({ "icon-size": Gtk.IconSize.MENU });
         this._mainToolbar.get_style_context().add_class("np-toolbar");
-        this._mainToolbar.set_icon_size(Gtk.IconSize.MENU);
+        this._mainToolbar.set_show_arrow(false);
         this._mainToolbar.show();
 
-        this._toolbarActor = new GtkClutter.Actor({ contents: this._mainToolbar });
-
-        this._toolbarActor.set_size(32, 32);
-        this._toolbarActor.set_opacity(0);
+        this._toolbarActor = new GtkClutter.Actor({ contents: this._mainToolbar,
+                                                    "show-on-set-parent": false });
 
         this._toolbarZoom = new Gtk.ToolButton({ expand: false,
                                                  "icon-name": "view-fullscreen-symbolic" });



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