]> Pileus Git - ~andy/gtk/blobdiff - gtk/gtktreeview.c
filechooser: Use _gtk_file_has_native_path() throughout when testing for local_only
[~andy/gtk] / gtk / gtktreeview.c
index b47cd421210792796034440c959155ba9efa9058..505f41b588eca0e786c522e7b97655ae0de34240 100644 (file)
@@ -2864,12 +2864,14 @@ static int
 gtk_tree_view_get_expander_size (GtkTreeView *tree_view)
 {
   gint expander_size;
+  gint horizontal_separator;
 
   gtk_widget_style_get (GTK_WIDGET (tree_view),
                        "expander-size", &expander_size,
+                        "horizontal-separator", &horizontal_separator,
                        NULL);
 
-  return expander_size;
+  return expander_size + (horizontal_separator / 2);
 }
 
 static gboolean
@@ -9238,12 +9240,19 @@ gtk_tree_view_get_arrow_xrange (GtkTreeView *tree_view,
   GList *list;
   GtkTreeViewColumn *tmp_column = NULL;
   gint total_width;
-  gint expander_size;
+  gint expander_size, expander_render_size;
+  gint horizontal_separator;
   gboolean indent_expanders;
   gboolean rtl;
 
+  gtk_widget_style_get (GTK_WIDGET (tree_view),
+                       "indent-expanders", &indent_expanders,
+                        "horizontal-separator", &horizontal_separator,
+                       NULL);
+
   rtl = (gtk_widget_get_direction (GTK_WIDGET (tree_view)) == GTK_TEXT_DIR_RTL);
   expander_size = gtk_tree_view_get_expander_size (tree_view);
+  expander_render_size = expander_size - (horizontal_separator / 2);
 
   total_width = 0;
   for (list = (rtl ? g_list_last (tree_view->priv->columns) : g_list_first (tree_view->priv->columns));
@@ -9265,9 +9274,7 @@ gtk_tree_view_get_arrow_xrange (GtkTreeView *tree_view,
         total_width += gtk_tree_view_column_get_width (tmp_column);
     }
 
-  gtk_widget_style_get (GTK_WIDGET (tree_view),
-                       "indent-expanders", &indent_expanders,
-                       NULL);
+  x_offset += (expander_size - expander_render_size);
 
   if (indent_expanders)
     {
@@ -9282,7 +9289,7 @@ gtk_tree_view_get_arrow_xrange (GtkTreeView *tree_view,
   if (tmp_column &&
       gtk_tree_view_column_get_visible (tmp_column))
     /* +1 because x2 isn't included in the range. */
-    *x2 = *x1 + expander_size + 1;
+    *x2 = *x1 + expander_render_size + 1;
   else
     *x2 = *x1;
 }
@@ -10081,7 +10088,6 @@ gtk_tree_view_draw_arrow (GtkTreeView *tree_view,
   gint x_offset = 0;
   gint x2;
   gint vertical_separator;
-  gint expander_size;
   GtkCellRendererState flags = 0;
 
   widget = GTK_WIDGET (tree_view);
@@ -10090,7 +10096,6 @@ gtk_tree_view_draw_arrow (GtkTreeView *tree_view,
   gtk_widget_style_get (widget,
                         "vertical-separator", &vertical_separator,
                         NULL);
-  expander_size = gtk_tree_view_get_expander_size (tree_view);
 
   if (! GTK_RBNODE_FLAG_SET (node, GTK_RBNODE_IS_PARENT))
     return;
@@ -10100,7 +10105,7 @@ gtk_tree_view_draw_arrow (GtkTreeView *tree_view,
   area.x = x_offset;
   area.y = gtk_tree_view_get_cell_area_y_offset (tree_view, tree, node,
                                                  vertical_separator);
-  area.width = expander_size;
+  area.width = x2 - x_offset;
   area.height = gtk_tree_view_get_cell_area_height (tree_view, node,
                                                     vertical_separator);