Commit ff9e1e7a authored by Matthias Clasen's avatar Matthias Clasen Committed by Matthias Clasen

Invalidate the window if the tree is empty, to avoid resizing artifacts

2004-10-23  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktreeview.c (gtk_tree_view_size_allocate): Invalidate
	the window if the tree is empty, to avoid resizing artifacts
	from the focus rectangle.  (#155881, Vincent Noel, patch by
	Billy Biggs)
parent c50d0e05
2004-10-23 Matthias Clasen <mclasen@redhat.com>
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): Invalidate
the window if the tree is empty, to avoid resizing artifacts
from the focus rectangle. (#155881, Vincent Noel, patch by
Billy Biggs)
Sat Oct 23 16:14:37 2004 Søren Sandmann <sandmann@redhat.com>
* gtk/gtksequence.c (_gtk_sequence_node_insert_sorted): Remove
......
2004-10-23 Matthias Clasen <mclasen@redhat.com>
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): Invalidate
the window if the tree is empty, to avoid resizing artifacts
from the focus rectangle. (#155881, Vincent Noel, patch by
Billy Biggs)
Sat Oct 23 16:14:37 2004 Søren Sandmann <sandmann@redhat.com>
* gtk/gtksequence.c (_gtk_sequence_node_insert_sorted): Remove
......
2004-10-23 Matthias Clasen <mclasen@redhat.com>
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): Invalidate
the window if the tree is empty, to avoid resizing artifacts
from the focus rectangle. (#155881, Vincent Noel, patch by
Billy Biggs)
Sat Oct 23 16:14:37 2004 Søren Sandmann <sandmann@redhat.com>
* gtk/gtksequence.c (_gtk_sequence_node_insert_sorted): Remove
......
2004-10-23 Matthias Clasen <mclasen@redhat.com>
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): Invalidate
the window if the tree is empty, to avoid resizing artifacts
from the focus rectangle. (#155881, Vincent Noel, patch by
Billy Biggs)
Sat Oct 23 16:14:37 2004 Søren Sandmann <sandmann@redhat.com>
* gtk/gtksequence.c (_gtk_sequence_node_insert_sorted): Remove
......
......@@ -288,7 +288,7 @@ static void install_presize_handler (GtkTreeView *tree_view);
static void install_scroll_sync_handler (GtkTreeView *tree_view);
static void gtk_tree_view_dy_to_top_row (GtkTreeView *tree_view);
static void gtk_tree_view_top_row_to_dy (GtkTreeView *tree_view);
static void invalidate_empty_focus (GtkTreeView *tree_view);
/* Internal functions */
static gboolean gtk_tree_view_is_expander_column (GtkTreeView *tree_view,
......@@ -2109,6 +2109,9 @@ gtk_tree_view_size_allocate (GtkWidget *widget,
gtk_tree_view_size_allocate_columns (widget);
if (tree_view->priv->tree == NULL)
invalidate_empty_focus (tree_view);
if (GTK_WIDGET_REALIZED (widget))
{
gboolean has_expand_column = FALSE;
......@@ -3353,6 +3356,23 @@ gtk_tree_view_motion (GtkWidget *widget,
return FALSE;
}
/* Invalidate the focus rectangle near the edge of the bin_window; used when
* the tree is empty.
*/
static void
invalidate_empty_focus (GtkTreeView *tree_view)
{
GdkRectangle area;
if (!GTK_WIDGET_HAS_FOCUS (tree_view))
return;
area.x = 0;
area.y = 0;
gdk_drawable_get_size (tree_view->priv->bin_window, &area.width, &area.height);
gdk_window_invalidate_rect (tree_view->priv->bin_window, &area, FALSE);
}
/* Draws a focus rectangle near the edge of the bin_window; used when the tree
* is empty.
*/
......
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