[latexila] Fix inline toolbars style: use a Box instead of a Grid



commit ba4751ed6c17bce15db1032b619432c2741d7b18
Author: SÃbastien Wilmet <swilmet gnome org>
Date:   Thu Aug 9 23:13:39 2012 +0200

    Fix inline toolbars style: use a Box instead of a Grid
    
    With a GtkGrid the inline toolbars style is not perfect. The line
    separating the TreeView and the Toolbar is thicker. And the corners at
    the bottom of the toolbars are not rounded.
    
    With a vertical GtkBox, it's OK.
    
    The bug should be reported if it is not already the case.

 src/build_tool_dialog.vala       |   11 +++++------
 src/build_tools_preferences.vala |   15 +++++++--------
 2 files changed, 12 insertions(+), 14 deletions(-)
---
diff --git a/src/build_tool_dialog.vala b/src/build_tool_dialog.vala
index 98ebedc..28ebc21 100644
--- a/src/build_tool_dialog.vala
+++ b/src/build_tool_dialog.vala
@@ -650,14 +650,13 @@ public class BuildToolDialog : GLib.Object
 
         /* Pack */
 
-        Grid jobs_grid = new Grid ();
-        jobs_grid.set_orientation (Orientation.VERTICAL);
+        Box jobs_box = new Box (Orientation.VERTICAL, 0);
         placeholders_grid.set_margin_bottom (8);
-        jobs_grid.add (placeholders_grid);
-        jobs_grid.add (scrolled_window);
-        jobs_grid.add (toolbar);
+        jobs_box.pack_start (placeholders_grid, false);
+        jobs_box.pack_start (scrolled_window);
+        jobs_box.pack_start (toolbar, false);
 
-        return Utils.get_dialog_component (_("Jobs"), jobs_grid);
+        return Utils.get_dialog_component (_("Jobs"), jobs_box);
     }
 
     private Grid get_files_to_open_grid ()
diff --git a/src/build_tools_preferences.vala b/src/build_tools_preferences.vala
index 499e1ec..911fc5d 100644
--- a/src/build_tools_preferences.vala
+++ b/src/build_tools_preferences.vala
@@ -104,7 +104,7 @@ public class BuildToolsPreferences : GLib.Object
         toolbar.insert (properties_button, -1);
         toolbar.insert (copy_button, -1);
 
-        Grid join = join_view_and_toolbar (_default_view, toolbar);
+        Widget join = join_view_and_toolbar (_default_view, toolbar);
 
         return Utils.get_dialog_component (_("Default build tools"), join);
     }
@@ -124,12 +124,12 @@ public class BuildToolsPreferences : GLib.Object
         toolbar.insert (get_up_button (), -1);
         toolbar.insert (get_down_button (), -1);
 
-        Grid join = join_view_and_toolbar (_personal_view, toolbar);
+        Widget join = join_view_and_toolbar (_personal_view, toolbar);
 
         return Utils.get_dialog_component (_("Personal build tools"), join);
     }
 
-    private Grid join_view_and_toolbar (TreeView view, Toolbar toolbar)
+    private Widget join_view_and_toolbar (TreeView view, Toolbar toolbar)
     {
         view.expand = true;
         ScrolledWindow scrolled_window = Utils.add_scrollbar (view);
@@ -146,12 +146,11 @@ public class BuildToolsPreferences : GLib.Object
         context.add_class (STYLE_CLASS_INLINE_TOOLBAR);
         context.set_junction_sides (JunctionSides.TOP);
 
-        Grid grid = new Grid ();
-        grid.set_orientation (Orientation.VERTICAL);
-        grid.add (scrolled_window);
-        grid.add (toolbar);
+        Box box = new Box (Orientation.VERTICAL, 0);
+        box.pack_start (scrolled_window);
+        box.pack_start (toolbar, false);
 
-        return grid;
+        return box;
     }
 
     private ListStore get_new_store ()



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