mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-05 16:20:10 +00:00
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).
This commit is contained in:
parent
83c626bbe0
commit
c378989102
13
ChangeLog
13
ChangeLog
@ -1,3 +1,16 @@
|
||||
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:
|
||||
|
@ -1,3 +1,16 @@
|
||||
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:
|
||||
|
@ -1,3 +1,16 @@
|
||||
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:
|
||||
|
@ -1,3 +1,16 @@
|
||||
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:
|
||||
|
@ -1,3 +1,16 @@
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user