[baobab] Center toolbar buttons



commit e7fb3358afd21164889c2afba1875a746ffad887
Author: Paolo Borelli <paolo borelli nice-software com>
Date:   Mon Jul 23 19:07:50 2012 +0200

    Center toolbar buttons

 src/baobab-main-window.ui |   14 +++++++++-----
 src/baobab-window.vala    |    3 +++
 2 files changed, 12 insertions(+), 5 deletions(-)
---
diff --git a/src/baobab-main-window.ui b/src/baobab-main-window.ui
index de08e90..66b6bee 100644
--- a/src/baobab-main-window.ui
+++ b/src/baobab-main-window.ui
@@ -15,7 +15,7 @@
             <child>
               <object class="GtkButtonBox" id="scan-buttonbox">
                 <property name="visible">True</property>
-                <property name="layout_style">start</property>
+                <property name="layout_style">center</property>
                 <style>
                   <class name="linked"/>
                 </style>
@@ -50,10 +50,14 @@
               </object>
             </child>
           </object>
+          <packing>
+            <property name="expand">True</property>
+            <property name="homogeneous">True</property>
+          </packing>
         </child>
         <child>
           <object class="GtkToolButton" id="show-home-page-button">
-            <property name="visible">True</property>
+            <property name="visible">False</property>
             <property name="can_focus">False</property>
             <property name="has_tooltip">True</property>
             <property name="is_important">True</property>
@@ -70,8 +74,8 @@
           </packing>
         </child>
         <child>
-          <object class="GtkSeparatorToolItem" id="separatortoolitem1">
-            <property name="visible">True</property>
+          <object class="GtkSeparatorToolItem" id="toolbar-separator">
+            <property name="visible">False</property>
             <property name="can_focus">False</property>
             <property name="draw">False</property>
           </object>
@@ -97,7 +101,7 @@
         </child>
         <child>
           <object class="GtkToolButton" id="rescan-button">
-            <property name="visible">True</property>
+            <property name="visible">False</property>
             <property name="can_focus">False</property>
             <property name="has_tooltip">True</property>
             <property name="tooltip_markup" translatable="yes">Reload</property>
diff --git a/src/baobab-window.vala b/src/baobab-window.vala
index 249907c..f127adc 100644
--- a/src/baobab-window.vala
+++ b/src/baobab-window.vala
@@ -28,6 +28,7 @@ namespace Baobab {
         Gtk.Toolbar toolbar;
         Gtk.ToolItem toolbar_home_toolitem;
         Gtk.ToolButton toolbar_show_home_page;
+        Gtk.SeparatorToolItem toolbar_separator;
         Gtk.ToolButton toolbar_rescan;
         Gtk.InfoBar infobar;
         Gtk.Label infobar_primary;
@@ -118,6 +119,7 @@ namespace Baobab {
             toolbar = builder.get_object ("toolbar") as Gtk.Toolbar;
             toolbar_home_toolitem = builder.get_object ("home-page-toolitem") as Gtk.ToolItem;
             toolbar_show_home_page = builder.get_object ("show-home-page-button") as Gtk.ToolButton;
+            toolbar_separator = builder.get_object ("toolbar-separator") as Gtk.SeparatorToolItem;
             toolbar_rescan = builder.get_object ("rescan-button") as Gtk.ToolButton;
             infobar = builder.get_object ("infobar") as Gtk.InfoBar;
             infobar_primary = builder.get_object ("infobar-primary-label") as Gtk.Label;
@@ -477,6 +479,7 @@ namespace Baobab {
         void set_ui_state (UIPage page, bool busy) {
             toolbar_home_toolitem.visible = (page == UIPage.HOME);
             toolbar_show_home_page.visible = (page == UIPage.RESULT);
+            toolbar_separator.visible = (page == UIPage.RESULT);
             toolbar_rescan.visible = (page == UIPage.RESULT);
 
             set_busy (busy);



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