mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 10:50:10 +00:00
only draw the sort column as different if there are 3 or more visible
Tue Feb 24 14:43:07 2004 Jonathan Blandford <jrb@gnome.org> * gtk/gtktreeview.c (gtk_tree_view_bin_expose): only draw the sort column as different if there are 3 or more visible columns.
This commit is contained in:
parent
32e3311378
commit
9ae401d544
@ -1,3 +1,8 @@
|
||||
Tue Feb 24 14:43:07 2004 Jonathan Blandford <jrb@gnome.org>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_bin_expose): only draw the sort
|
||||
column as different if there are 3 or more visible columns.
|
||||
|
||||
2004-02-24 Anders Carlsson <andersca@gnome.org>
|
||||
|
||||
* gtk/gtkfilechooserdefault.c: (shortcuts_insert_separator):
|
||||
|
@ -1,3 +1,8 @@
|
||||
Tue Feb 24 14:43:07 2004 Jonathan Blandford <jrb@gnome.org>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_bin_expose): only draw the sort
|
||||
column as different if there are 3 or more visible columns.
|
||||
|
||||
2004-02-24 Anders Carlsson <andersca@gnome.org>
|
||||
|
||||
* gtk/gtkfilechooserdefault.c: (shortcuts_insert_separator):
|
||||
|
@ -1,3 +1,8 @@
|
||||
Tue Feb 24 14:43:07 2004 Jonathan Blandford <jrb@gnome.org>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_bin_expose): only draw the sort
|
||||
column as different if there are 3 or more visible columns.
|
||||
|
||||
2004-02-24 Anders Carlsson <andersca@gnome.org>
|
||||
|
||||
* gtk/gtkfilechooserdefault.c: (shortcuts_insert_separator):
|
||||
|
@ -1,3 +1,8 @@
|
||||
Tue Feb 24 14:43:07 2004 Jonathan Blandford <jrb@gnome.org>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_bin_expose): only draw the sort
|
||||
column as different if there are 3 or more visible columns.
|
||||
|
||||
2004-02-24 Anders Carlsson <andersca@gnome.org>
|
||||
|
||||
* gtk/gtkfilechooserdefault.c: (shortcuts_insert_separator):
|
||||
|
@ -1,3 +1,8 @@
|
||||
Tue Feb 24 14:43:07 2004 Jonathan Blandford <jrb@gnome.org>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_bin_expose): only draw the sort
|
||||
column as different if there are 3 or more visible columns.
|
||||
|
||||
2004-02-24 Anders Carlsson <andersca@gnome.org>
|
||||
|
||||
* gtk/gtkfilechooserdefault.c: (shortcuts_insert_separator):
|
||||
|
@ -3165,6 +3165,7 @@ gtk_tree_view_bin_expose (GtkWidget *widget,
|
||||
gboolean allow_rules;
|
||||
gboolean has_special_cell;
|
||||
gboolean rtl;
|
||||
gint n_visible_columns;
|
||||
|
||||
g_return_val_if_fail (GTK_IS_TREE_VIEW (widget), FALSE);
|
||||
|
||||
@ -3227,6 +3228,16 @@ gtk_tree_view_bin_expose (GtkWidget *widget,
|
||||
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)
|
||||
{
|
||||
if (! GTK_TREE_VIEW_COLUMN (list->data)->visible)
|
||||
continue;
|
||||
n_visible_columns ++;
|
||||
}
|
||||
|
||||
/* Find the last column */
|
||||
for (last_column = rtl ? g_list_first (tree_view->priv->columns) : g_list_last (tree_view->priv->columns);
|
||||
last_column &&
|
||||
!(GTK_TREE_VIEW_COLUMN (last_column->data)->visible) &&
|
||||
@ -3283,7 +3294,7 @@ gtk_tree_view_bin_expose (GtkWidget *widget,
|
||||
}
|
||||
|
||||
if (column->show_sort_indicator)
|
||||
flags |= GTK_CELL_RENDERER_SORTED;
|
||||
flags |= GTK_CELL_RENDERER_SORTED;
|
||||
else
|
||||
flags &= ~GTK_CELL_RENDERER_SORTED;
|
||||
|
||||
@ -3319,7 +3330,8 @@ gtk_tree_view_bin_expose (GtkWidget *widget,
|
||||
*/
|
||||
if (allow_rules && tree_view->priv->has_rules)
|
||||
{
|
||||
if (flags & GTK_CELL_RENDERER_SORTED)
|
||||
if ((flags & GTK_CELL_RENDERER_SORTED) &&
|
||||
n_visible_columns >= 3)
|
||||
{
|
||||
if (parity)
|
||||
detail = "cell_odd_ruled_sorted";
|
||||
@ -3336,7 +3348,8 @@ gtk_tree_view_bin_expose (GtkWidget *widget,
|
||||
}
|
||||
else
|
||||
{
|
||||
if (flags & GTK_CELL_RENDERER_SORTED)
|
||||
if ((flags & GTK_CELL_RENDERER_SORTED) &&
|
||||
n_visible_columns >= 3)
|
||||
{
|
||||
if (parity)
|
||||
detail = "cell_odd_sorted";
|
||||
|
Loading…
Reference in New Issue
Block a user