Commit 7a02c5b5 authored by Kristian Rietveld's avatar Kristian Rietveld Committed by Kristian Rietveld

paint a flat box on the area the treeview got allocated extra vertically

2005-07-13  Kristian Rietveld  <kris@gtk.org>

	* gtk/gtktreeview.c (gtk_tree_view_bin_expose): paint a flat box
	on the area the treeview got allocated extra vertically (fixes
	#142063, reported by Brian Bober).

	* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_cell_process_action):
	make this function calculate real_cell_area and real_background_area
	correctly. (fixes #309249, reported by Bernd Demian).
parent a1e39dc5
2005-07-13 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (gtk_tree_view_bin_expose): paint a flat box
on the area the treeview got allocated extra vertically (fixes
#142063, reported by Brian Bober).
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_cell_process_action):
make this function calculate real_cell_area and real_background_area
correctly. (fixes #309249, reported by Bernd Demian).
2005-07-13 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkcalendar.c (calendar_realize_arrows): Fix an
......
2005-07-13 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (gtk_tree_view_bin_expose): paint a flat box
on the area the treeview got allocated extra vertically (fixes
#142063, reported by Brian Bober).
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_cell_process_action):
make this function calculate real_cell_area and real_background_area
correctly. (fixes #309249, reported by Bernd Demian).
2005-07-13 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkcalendar.c (calendar_realize_arrows): Fix an
......
2005-07-13 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (gtk_tree_view_bin_expose): paint a flat box
on the area the treeview got allocated extra vertically (fixes
#142063, reported by Brian Bober).
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_cell_process_action):
make this function calculate real_cell_area and real_background_area
correctly. (fixes #309249, reported by Bernd Demian).
2005-07-13 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkcalendar.c (calendar_realize_arrows): Fix an
......
......@@ -3458,6 +3458,7 @@ gtk_tree_view_bin_expose (GtkWidget *widget,
guint flags;
gint highlight_x;
gint bin_window_width;
gint bin_window_height;
GtkTreePath *cursor_path;
GtkTreePath *drag_dest_path;
GList *last_column;
......@@ -3501,6 +3502,21 @@ gtk_tree_view_bin_expose (GtkWidget *widget,
if (new_y < 0)
new_y = 0;
y_offset = -_gtk_rbtree_find_offset (tree_view->priv->tree, new_y, &tree, &node);
gdk_drawable_get_size (tree_view->priv->bin_window,
&bin_window_width, &bin_window_height);
if (tree_view->priv->height < bin_window_height)
{
gtk_paint_flat_box (widget->style,
event->window,
widget->state,
GTK_SHADOW_NONE,
&event->area,
widget,
"cell_even",
0, tree_view->priv->height,
bin_window_width, bin_window_height);
}
if (node == NULL)
return TRUE;
......@@ -3532,9 +3548,6 @@ gtk_tree_view_bin_expose (GtkWidget *widget,
_gtk_tree_view_find_node (tree_view, drag_dest_path,
&drag_highlight_tree, &drag_highlight);
gdk_drawable_get_size (tree_view->priv->bin_window,
&bin_window_width, NULL);
n_visible_columns = 0;
for (list = tree_view->priv->columns; list; list = list->next)
......
......@@ -2654,6 +2654,7 @@ gtk_tree_view_column_cell_process_action (GtkTreeViewColumn *tree_column,
GdkRectangle real_cell_area;
GdkRectangle real_background_area;
GdkRectangle real_expose_area = *cell_area;
gint depth = 0;
gint expand_cell_count = 0;
gint full_requested_width = 0;
gint extra_space;
......@@ -2709,6 +2710,8 @@ gtk_tree_view_column_cell_process_action (GtkTreeViewColumn *tree_column,
real_cell_area = *cell_area;
real_background_area = *background_area;
depth = real_cell_area.x - real_background_area.x - horizontal_separator/2;
real_cell_area.x += focus_line_width;
real_cell_area.y += focus_line_width;
real_cell_area.height -= 2 * focus_line_width;
......@@ -2752,7 +2755,7 @@ gtk_tree_view_column_cell_process_action (GtkTreeViewColumn *tree_column,
info->real_width = info->requested_width + (info->expand?extra_space:0);
/* We constrain ourselves to only the width available */
if (real_cell_area.x + info->real_width > cell_area->x + cell_area->width)
if (real_cell_area.x - focus_line_width + info->real_width > cell_area->x + cell_area->width)
{
info->real_width = cell_area->x + cell_area->width - real_cell_area.x;
}
......@@ -2761,15 +2764,11 @@ gtk_tree_view_column_cell_process_action (GtkTreeViewColumn *tree_column,
break;
real_cell_area.width = info->real_width;
real_background_area.width=
real_cell_area.x + real_cell_area.width - real_background_area.x;
real_cell_area.width -= 2 * focus_line_width;
real_background_area.width = info->real_width + horizontal_separator + depth;
rtl_cell_area = real_cell_area;
rtl_background_area = real_background_area;
if (rtl)
{
......@@ -2920,7 +2919,7 @@ gtk_tree_view_column_cell_process_action (GtkTreeViewColumn *tree_column,
info->real_width = info->requested_width + (info->expand?extra_space:0);
/* We constrain ourselves to only the width available */
if (real_cell_area.x + info->real_width > cell_area->x + cell_area->width)
if (real_cell_area.x - focus_line_width + info->real_width > cell_area->x + cell_area->width)
{
info->real_width = cell_area->x + cell_area->width - real_cell_area.x;
}
......@@ -2929,9 +2928,8 @@ gtk_tree_view_column_cell_process_action (GtkTreeViewColumn *tree_column,
break;
real_cell_area.width = info->real_width;
real_background_area.width =
real_cell_area.x + real_cell_area.width - real_background_area.x;
real_cell_area.width -= 2 * focus_line_width;
real_background_area.width = info->real_width + horizontal_separator + depth;
rtl_cell_area = real_cell_area;
rtl_background_area = real_background_area;
......
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