Commit c3789891 authored by Kristian Rietveld's avatar Kristian Rietveld Committed by Kristian Rietveld

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).
parent 83c626bb
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).
2003-05-27 Matthias Clasen <maclas@gmx.de>
* gtk/gtkwindow-decorate.c:
......
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).
2003-05-27 Matthias Clasen <maclas@gmx.de>
* gtk/gtkwindow-decorate.c:
......
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).
2003-05-27 Matthias Clasen <maclas@gmx.de>
* gtk/gtkwindow-decorate.c:
......
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).
2003-05-27 Matthias Clasen <maclas@gmx.de>
* gtk/gtkwindow-decorate.c:
......
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).
2003-05-27 Matthias Clasen <maclas@gmx.de>
* gtk/gtkwindow-decorate.c:
......
......@@ -3095,6 +3095,11 @@ gtk_tree_view_bin_expose (GtkWidget *widget,
else
flags &= ~GTK_CELL_RENDERER_SORTED;
if (cursor == node)
flags |= GTK_CELL_RENDERER_FOCUSED;
else
flags &= ~GTK_CELL_RENDERER_FOCUSED;
background_area.x = cell_offset;
background_area.width = column->width;
......
......@@ -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);
......
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