Commit 0b66b244 authored by Matthias Clasen's avatar Matthias Clasen

Bug 539733 – No way to control treeview separator height

svn path=/trunk/; revision=20932
parent 5478721a
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
......
......@@ -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))
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment