From 60f52f5eaedd302180188c671ab9298b23119930 Mon Sep 17 00:00:00 2001 From: Christopher James Lahey Date: Thu, 25 May 2000 19:27:46 +0000 Subject: Account for extra pixel at right end of ETable. 2000-05-25 Christopher James Lahey * e-table-header.c: Account for extra pixel at right end of ETable. * e-table-item.c: Make grid less intrusive. * e-table.c: Make scrollbars disappear when appropriate. svn path=/trunk/; revision=3206 --- widgets/e-table/ChangeLog | 9 +++++++++ widgets/e-table/e-table-header.c | 6 ++++-- widgets/e-table/e-table-item.c | 2 +- widgets/e-table/e-table.c | 3 ++- 4 files changed, 16 insertions(+), 4 deletions(-) (limited to 'widgets/e-table') diff --git a/widgets/e-table/ChangeLog b/widgets/e-table/ChangeLog index 0bda1dbade..644d1d64f9 100644 --- a/widgets/e-table/ChangeLog +++ b/widgets/e-table/ChangeLog @@ -1,3 +1,12 @@ +2000-05-25 Christopher James Lahey + + * e-table-header.c: Account for extra pixel at right end of + ETable. + + * e-table-item.c: Make grid less intrusive. + + * e-table.c: Make scrollbars disappear when appropriate. + 2000-05-25 Christopher James Lahey * e-table-header-item.c: Made dragging columns work. diff --git a/widgets/e-table/e-table-header.c b/widgets/e-table/e-table-header.c index b438226153..f1066f745c 100644 --- a/widgets/e-table/e-table-header.c +++ b/widgets/e-table/e-table-header.c @@ -511,7 +511,8 @@ eth_set_size (ETableHeader *eth, int idx, int size) for (i = 0; i < idx; i++) { left_width += eth->columns[i]->width; } - usable_width = eth->width - left_width; + /* - 1 to account for the last pixel border. */ + usable_width = eth->width - left_width - 1; if (eth->sort_info) usable_width -= e_table_sort_info_grouping_get_count(eth->sort_info) * GROUP_INDENT; @@ -631,7 +632,8 @@ eth_calc_widths (ETableHeader *eth) int extra, extra_left; double expansion; int last_resizeable = -1; - extra = eth->width; + /* - 1 to account for the last pixel border. */ + extra = eth->width - 1; expansion = 0; for (i = 0; i < eth->col_count; i++) { extra -= eth->columns[i]->min_width; diff --git a/widgets/e-table/e-table-item.c b/widgets/e-table/e-table-item.c index 39af0e5193..05b722f27c 100644 --- a/widgets/e-table/e-table-item.c +++ b/widgets/e-table/e-table-item.c @@ -822,7 +822,7 @@ eti_realize (GnomeCanvasItem *item) /* This sets it to gray */ /* gdk_gc_set_foreground (eti->grid_gc, &canvas_widget->style->bg [GTK_STATE_NORMAL]); */ #else - gdk_gc_set_foreground (eti->grid_gc, &canvas_widget->style->black); + gdk_gc_set_foreground (eti->grid_gc, &canvas_widget->style->dark [GTK_STATE_NORMAL]); #endif eti->focus_gc = gdk_gc_new (window); gdk_gc_set_foreground (eti->focus_gc, &canvas_widget->style->bg [GTK_STATE_NORMAL]); diff --git a/widgets/e-table/e-table.c b/widgets/e-table/e-table.c index 11826cd109..225880705b 100644 --- a/widgets/e-table/e-table.c +++ b/widgets/e-table/e-table.c @@ -171,9 +171,10 @@ table_canvas_reflow (GnomeCanvas *canvas, ETable *e_table) "height", &height, "width", &width, NULL); + /* I have no idea why this needs to be -1, but it works. */ gnome_canvas_set_scroll_region ( GNOME_CANVAS (e_table->table_canvas), - 0, 0, MAX(width, alloc->width), MAX (height, alloc->height)); + 0, 0, MAX((int)width, alloc->width) - 1, MAX ((int)height, alloc->height) - 1); } static void -- cgit v1.2.3