]> Pileus Git - ~andy/gtk/commitdiff
Bug 539733 – No way to control treeview separator height
authorMatthias Clasen <matthiasc@src.gnome.org>
Sat, 2 Aug 2008 04:32:12 +0000 (04:32 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Sat, 2 Aug 2008 04:32:12 +0000 (04:32 +0000)
svn path=/trunk/; revision=20932

ChangeLog
gtk/gtktreeview.c

index 2b0898d0b4af493b0b5844d90a5eb7ec9c6ed397..a75a871c05dc3675a312eb8bff56e7714bc37827 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2008-08-02  Matthias Clasen  <mclasen@redhat.com>
+
+       Bug 539733 – No way to control treeview separator height
+
+       * gtk/gtktreeview.c: Respect the wide-separators and
+       separator-height style properties when drawing separators.
+       Patch by Christian Dywan
+
 2008-08-02  Matthias Clasen  <mclasen@redhat.com>
 
        Bug 65818 – rename gtk_window_set_default() and add getter for it
index b2d50f58af3a4b5c15fb13733d1114cf72c3ae47..3290638ff36da1e2ddfa9ad16d404b4d4e91c1a1 100644 (file)
@@ -777,7 +777,7 @@ gtk_tree_view_class_init (GtkTreeViewClass *class)
 #define _TREE_VIEW_EXPANDER_SIZE 12
 #define _TREE_VIEW_VERTICAL_SEPARATOR 2
 #define _TREE_VIEW_HORIZONTAL_SEPARATOR 2
-    
+
   gtk_widget_class_install_style_property (widget_class,
                                           g_param_spec_int ("expander-size",
                                                             P_("Expander Size"),
@@ -5577,6 +5577,8 @@ validate_row (GtkTreeView *tree_view,
   gboolean draw_vgrid_lines, draw_hgrid_lines;
   gint focus_pad;
   gint grid_line_width;
+  gboolean wide_separators;
+  gint separator_height;
 
   /* double check the row needs validating */
   if (! GTK_RBNODE_FLAG_SET (node, GTK_RBNODE_INVALID) &&
@@ -5591,6 +5593,8 @@ validate_row (GtkTreeView *tree_view,
                        "horizontal-separator", &horizontal_separator,
                        "vertical-separator", &vertical_separator,
                        "grid-line-width", &grid_line_width,
+                        "wide-separators",  &wide_separators,
+                        "separator-height", &separator_height,
                        NULL);
   
   draw_vgrid_lines =
@@ -5637,7 +5641,12 @@ validate_row (GtkTreeView *tree_view,
          height = MAX (height, tree_view->priv->expander_size);
        }
       else
-       height = 2 + 2 * focus_pad;
+        {
+          if (wide_separators)
+            height = separator_height + 2 * focus_pad;
+          else
+            height = 2 + 2 * focus_pad;
+        }
 
       if (gtk_tree_view_is_expander_column (tree_view, column))
         {