diff --git a/ChangeLog b/ChangeLog index 4aa0de7622769966fb81ba7ad731fbe792044df9..38a425d257ad8b77eabdc3687232e9adb7e3af39 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2005-07-13 Kristian Rietveld + + * 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 * gtk/gtkcalendar.c (calendar_realize_arrows): Fix an diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 4aa0de7622769966fb81ba7ad731fbe792044df9..38a425d257ad8b77eabdc3687232e9adb7e3af39 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,13 @@ +2005-07-13 Kristian Rietveld + + * 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 * gtk/gtkcalendar.c (calendar_realize_arrows): Fix an diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 4aa0de7622769966fb81ba7ad731fbe792044df9..38a425d257ad8b77eabdc3687232e9adb7e3af39 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,13 @@ +2005-07-13 Kristian Rietveld + + * 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 * gtk/gtkcalendar.c (calendar_realize_arrows): Fix an diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c index 164e900727fb601b9e5f3f1446e321337bc5fe37..d4bf62fe5e21a5d60a12ccaca53c3a64d287955e 100644 --- a/gtk/gtktreeview.c +++ b/gtk/gtktreeview.c @@ -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) diff --git a/gtk/gtktreeviewcolumn.c b/gtk/gtktreeviewcolumn.c index 945d0311f80f0177814c80ce035c4fdfa68d883f..226ab3a17ce3f761ed6a8ea3490c69d82ddea073 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;