diff options
author | Lars Hamann <lars@gtk.org> | 1999-02-06 00:21:56 +0000 |
---|---|---|
committer | Lars Hamann <lars@src.gnome.org> | 1999-02-06 00:21:56 +0000 |
commit | af30000afe9cfba73e9abf30b4a0a5827d9ef9d7 (patch) | |
tree | 837a455e410f546c73e4d6eb711ad6f3c34c1dc0 /gtk/gtkctree.c | |
parent | eb437560d35e11836eea5bac750e6f64e98d8632 (diff) | |
download | gtk+-af30000afe9cfba73e9abf30b4a0a5827d9ef9d7.tar.gz |
search last visible column instead of using clist->columns.
Sat Feb 6 00:21:14 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkctree.c (draw_row):
* gtk/gtkclist.c (draw_row) (new_column_width) (scroll_horizontal)
(title_focus): search last visible column instead of
using clist->columns.
Diffstat (limited to 'gtk/gtkctree.c')
-rw-r--r-- | gtk/gtkctree.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gtk/gtkctree.c b/gtk/gtkctree.c index da4b2c6610..bcc464f840 100644 --- a/gtk/gtkctree.c +++ b/gtk/gtkctree.c @@ -1580,6 +1580,7 @@ draw_row (GtkCList *clist, GdkRectangle cell_rectangle; GdkRectangle clip_rectangle; GdkRectangle intersect_rectangle; + gint last_column; gint column_left = 0; gint column_right = 0; gint offset = 0; @@ -1729,6 +1730,10 @@ draw_row (GtkCList *clist, } } + for (last_column = clist->columns - 1; + last_column >= 0 && !clist->column[last_column].visible; last_column--) + ; + /* iterate and draw all the columns (row cells) and draw their contents */ for (i = 0; i < clist->columns; i++) { @@ -1754,7 +1759,7 @@ draw_row (GtkCList *clist, cell_rectangle.x = clip_rectangle.x - COLUMN_INSET - CELL_SPACING; cell_rectangle.width = (clip_rectangle.width + 2 * COLUMN_INSET + - (1 + (i + 1 == clist->columns)) * CELL_SPACING); + (1 + (i == last_column)) * CELL_SPACING); cell_rectangle.y = clip_rectangle.y; cell_rectangle.height = clip_rectangle.height; |