diff options
author | Christopher James Lahey <clahey@helixcode.com> | 2000-05-26 03:27:46 +0800 |
---|---|---|
committer | Chris Lahey <clahey@src.gnome.org> | 2000-05-26 03:27:46 +0800 |
commit | 60f52f5eaedd302180188c671ab9298b23119930 (patch) | |
tree | c1982dcc66640dfecf8b90e71315a41db1042521 | |
parent | d306c2932807d068f453196abd3ca39580c4039a (diff) | |
download | gsoc2013-evolution-60f52f5eaedd302180188c671ab9298b23119930.tar.gz gsoc2013-evolution-60f52f5eaedd302180188c671ab9298b23119930.tar.zst gsoc2013-evolution-60f52f5eaedd302180188c671ab9298b23119930.zip |
Account for extra pixel at right end of ETable.
2000-05-25 Christopher James Lahey <clahey@helixcode.com>
* 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
-rw-r--r-- | widgets/e-table/ChangeLog | 9 | ||||
-rw-r--r-- | widgets/e-table/e-table-header.c | 6 | ||||
-rw-r--r-- | widgets/e-table/e-table-item.c | 2 | ||||
-rw-r--r-- | widgets/e-table/e-table.c | 3 | ||||
-rw-r--r-- | widgets/table/e-table-header.c | 6 | ||||
-rw-r--r-- | widgets/table/e-table-item.c | 2 | ||||
-rw-r--r-- | widgets/table/e-table.c | 3 |
7 files changed, 23 insertions, 8 deletions
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,5 +1,14 @@ 2000-05-25 Christopher James Lahey <clahey@helixcode.com> + * 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 <clahey@helixcode.com> + * e-table-header-item.c: Made dragging columns work. 2000-05-23 Christopher James Lahey <clahey@helixcode.com> 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 diff --git a/widgets/table/e-table-header.c b/widgets/table/e-table-header.c index b438226153..f1066f745c 100644 --- a/widgets/table/e-table-header.c +++ b/widgets/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/table/e-table-item.c b/widgets/table/e-table-item.c index 39af0e5193..05b722f27c 100644 --- a/widgets/table/e-table-item.c +++ b/widgets/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/table/e-table.c b/widgets/table/e-table.c index 11826cd109..225880705b 100644 --- a/widgets/table/e-table.c +++ b/widgets/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 |