diff options
author | Kristian Rietveld <kris@gtk.org> | 2005-07-13 19:14:15 +0000 |
---|---|---|
committer | Kristian Rietveld <kristian@src.gnome.org> | 2005-07-13 19:14:15 +0000 |
commit | 7a02c5b5082505f4fef6163215bcedcb401fbe5c (patch) | |
tree | 508f6a1a86badf7611f5469367154c52d597f8df /gtk/gtktreeviewcolumn.c | |
parent | a1e39dc5f79c1c36287a5f4edfac2c2c3cb055dc (diff) | |
download | gtk+-7a02c5b5082505f4fef6163215bcedcb401fbe5c.tar.gz |
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).
Diffstat (limited to 'gtk/gtktreeviewcolumn.c')
-rw-r--r-- | gtk/gtktreeviewcolumn.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/gtk/gtktreeviewcolumn.c b/gtk/gtktreeviewcolumn.c index 945d0311f8..226ab3a17c 100644 --- a/gtk/gtktreeviewcolumn.c +++ b/gtk/gtktreeviewcolumn.c @@ -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; |