diff options
author | Kristian Rietveld <kris@gtk.org> | 2003-05-29 13:47:32 +0000 |
---|---|---|
committer | Kristian Rietveld <kristian@src.gnome.org> | 2003-05-29 13:47:32 +0000 |
commit | c378989102edc3eed56d1db6555d3d45fd008f45 (patch) | |
tree | 6f55cdf1aa19b29291712f662d7c8c4114ea0e35 /gtk/gtktreeviewcolumn.c | |
parent | 83c626bbe007ad0bd1f3aebb1e291fb4cb097c4a (diff) | |
download | gtk+-c378989102edc3eed56d1db6555d3d45fd008f45.tar.gz |
Fixes #75745, reported by Richard Hult. Merged from stable.
Thu May 29 15:38:30 2003 Kristian Rietveld <kris@gtk.org>
Fixes #75745, reported by Richard Hult. Merged from stable.
* gtk/gtktreeview.c (gtk_tree_view_bin_expose): set/unset
GTK_CELL_RENDERER_FOCUSED flag whether the current node is the
cursor or not.
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_cell_process_action):
if we are rendering a cursor row, and the cell the be
processed has focus, then set the GTK_CELL_RENDERER_FOCUSED
flag (else we unset it).
Diffstat (limited to 'gtk/gtktreeviewcolumn.c')
-rw-r--r-- | gtk/gtktreeviewcolumn.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/gtk/gtktreeviewcolumn.c b/gtk/gtktreeviewcolumn.c index 4ee38b0a40..f12d6f8809 100644 --- a/gtk/gtktreeviewcolumn.c +++ b/gtk/gtktreeviewcolumn.c @@ -2484,6 +2484,7 @@ gtk_tree_view_column_cell_process_action (GtkTreeViewColumn *tree_column, gint focus_line_width; gint dx; gint special_cells; + gboolean cursor_row = FALSE; gboolean rtl; /* If we have rtl text, we need to transform our areas */ GdkRectangle rtl_cell_area; @@ -2521,6 +2522,8 @@ gtk_tree_view_column_cell_process_action (GtkTreeViewColumn *tree_column, } } + cursor_row = flags & GTK_CELL_RENDERER_FOCUSED; + gtk_widget_style_get (GTK_WIDGET (tree_column->tree_view), "focus-line-width", &focus_line_width, NULL); @@ -2562,8 +2565,10 @@ gtk_tree_view_column_cell_process_action (GtkTreeViewColumn *tree_column, if (! info->cell->visible) continue; - if (info->has_focus) + if ((info->has_focus || special_cells == 1) && cursor_row) flags |= GTK_CELL_RENDERER_FOCUSED; + else + flags &= ~GTK_CELL_RENDERER_FOCUSED; real_background_area.width = info->requested_width + (info->expand?extra_space:0); @@ -2715,8 +2720,10 @@ gtk_tree_view_column_cell_process_action (GtkTreeViewColumn *tree_column, if (! info->cell->visible) continue; - if (info->has_focus) + if ((info->has_focus || special_cells == 1) && cursor_row) flags |= GTK_CELL_RENDERER_FOCUSED; + else + flags &= ~GTK_CELL_RENDERER_FOCUSED; real_background_area.width = info->requested_width + (info->expand?extra_space:0); |