From a053aa88b946563ceb08ab1e750c484de19f7c9b Mon Sep 17 00:00:00 2001 From: Iain Holmes Date: Fri, 13 Oct 2000 00:11:27 +0000 Subject: Fixed gdk-font refcounting Added font_e argument to e-text Fixed the header-item drawing the pixmap incorrectly svn path=/trunk/; revision=5894 --- widgets/table/e-table-header-item.c | 37 ++++++++++++++++++++----------------- 1 file changed, 20 insertions(+), 17 deletions(-) (limited to 'widgets/table/e-table-header-item.c') diff --git a/widgets/table/e-table-header-item.c b/widgets/table/e-table-header-item.c index c728baa747..a64d0dd380 100644 --- a/widgets/table/e-table-header-item.c +++ b/widgets/table/e-table-header-item.c @@ -746,23 +746,26 @@ draw_button (ETableHeaderItem *ethi, ETableCol *col, case E_TABLE_COL_ARROW_UP: case E_TABLE_COL_ARROW_DOWN: - gtk_paint_arrow ( - gtk_widget_get_style (GTK_WIDGET(GNOME_CANVAS_ITEM(ethi)->canvas)), - drawable, - GTK_STATE_NORMAL, - GTK_SHADOW_IN, - &clip, - GTK_WIDGET(GNOME_CANVAS_ITEM(ethi)->canvas), - "header", - (arrow == E_TABLE_COL_ARROW_UP) ? GTK_ARROW_UP : GTK_ARROW_DOWN, - TRUE, - x + HEADER_PADDING / 2 + clip.width - MIN_ARROW_SIZE - 2, - y + (ethi->height - MIN_ARROW_SIZE) / 2, - MIN_ARROW_SIZE, - MIN_ARROW_SIZE); - - clip.width -= (MIN_ARROW_SIZE + 2 + HEADER_PADDING); - break; + if (!col->is_pixbuf || + (col->is_pixbuf && gdk_pixbuf_get_width (col->pixbuf) <= clip.width)) { + gtk_paint_arrow ( + gtk_widget_get_style (GTK_WIDGET(GNOME_CANVAS_ITEM(ethi)->canvas)), + drawable, + GTK_STATE_NORMAL, + GTK_SHADOW_IN, + &clip, + GTK_WIDGET(GNOME_CANVAS_ITEM(ethi)->canvas), + "header", + (arrow == E_TABLE_COL_ARROW_UP) ? GTK_ARROW_UP : GTK_ARROW_DOWN, + TRUE, + x + HEADER_PADDING / 2 + clip.width - MIN_ARROW_SIZE - 2, + y + (ethi->height - MIN_ARROW_SIZE) / 2, + MIN_ARROW_SIZE, + MIN_ARROW_SIZE); + + clip.width -= (MIN_ARROW_SIZE + 2 + HEADER_PADDING); + break; + } } if (col->is_pixbuf){ -- cgit