From a000f7480bacf960f4cb3bdf2ff29e5f1af03f7b Mon Sep 17 00:00:00 2001 From: Christopher James Lahey Date: Wed, 13 Dec 2000 22:34:36 +0000 Subject: New function to calculate the extra pixels per column header. 2000-12-13 Christopher James Lahey * e-table-header-utils.c, e-table-header-utils.h (e_table_header_width_extras): New function to calculate the extra pixels per column header. * e-table-header.c, e-table-header.h: Added a "width_extras" argument which is used to calculate the correct minimum widths for each column header after adding padding. * e-table-item.c (_do_tooltip): Destroy the old tooltip window when creating the new one. (eti_event): Destroy the old tooltip window if the person presses a key. Don't handle the tab key. * e-table.c (et_state_to_header): Set the ETableHeader's width_extras argument. svn path=/trunk/; revision=6978 --- widgets/table/e-table-header-utils.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'widgets/table/e-table-header-utils.c') diff --git a/widgets/table/e-table-header-utils.c b/widgets/table/e-table-header-utils.c index 990a7a09f7..b6d35507bf 100644 --- a/widgets/table/e-table-header-utils.c +++ b/widgets/table/e-table-header-utils.c @@ -41,7 +41,7 @@ * * Return value: The height of the button, in pixels. **/ -int +double e_table_header_compute_height (ETableCol *ecol, GtkStyle *style, GdkFont *font) { int ythick; @@ -70,6 +70,14 @@ e_table_header_compute_height (ETableCol *ecol, GtkStyle *style, GdkFont *font) return height; } +double +e_table_header_width_extras (GtkStyle *style) +{ + g_return_val_if_fail (style != NULL, -1); + + return 2 * (style->klass->xthickness + HEADER_PADDING); +} + /* Creates a pixmap that is a composite of a background color and the upper-left * corner rectangle of a pixbuf. */ -- cgit v1.2.3