diff options
author | Milan Crha <mcrha@redhat.com> | 2009-10-27 02:23:41 +0800 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2009-10-27 02:23:41 +0800 |
commit | 7263df12faea202f05f7843a393814ec6083f714 (patch) | |
tree | 1a1e1963762e6e627e4bf5abb0133bc6bcf6e6d1 | |
parent | 52ba8fb385736e8e54aad08b6c9930411a9f127e (diff) | |
download | gsoc2013-evolution-7263df12faea202f05f7843a393814ec6083f714.tar.gz gsoc2013-evolution-7263df12faea202f05f7843a393814ec6083f714.tar.zst gsoc2013-evolution-7263df12faea202f05f7843a393814ec6083f714.zip |
Bug #204900 - The sort indication arrows cover up the icons in tab header
-rw-r--r-- | widgets/table/e-table-header-utils.c | 45 |
1 files changed, 30 insertions, 15 deletions
diff --git a/widgets/table/e-table-header-utils.c b/widgets/table/e-table-header-utils.c index c87ae40f79..2f682bb442 100644 --- a/widgets/table/e-table-header-utils.c +++ b/widgets/table/e-table-header-utils.c @@ -329,6 +329,7 @@ e_table_header_draw_button (GdkDrawable *drawable, ETableCol *ecol, gint xthick, ythick; gint inner_x, inner_y; gint inner_width, inner_height; + gint arrow_width = 0, arrow_height = 0; GdkGC *gc; PangoLayout *layout; static gpointer g_label = NULL; @@ -376,31 +377,20 @@ e_table_header_draw_button (GdkDrawable *drawable, ETableCol *ecol, inner_x = x + xthick + HEADER_PADDING; inner_y = y + ythick + HEADER_PADDING; - /* Arrow */ + /* Arrow space */ switch (arrow) { case E_TABLE_COL_ARROW_NONE: break; case E_TABLE_COL_ARROW_UP: - case E_TABLE_COL_ARROW_DOWN: { - gint arrow_width, arrow_height; - + case E_TABLE_COL_ARROW_DOWN: arrow_width = MIN (MIN_ARROW_SIZE, inner_width); arrow_height = MIN (MIN_ARROW_SIZE, inner_height); - gtk_paint_arrow (style, drawable, state, - GTK_SHADOW_NONE, NULL, widget, "header", - (arrow == E_TABLE_COL_ARROW_UP) ? GTK_ARROW_UP : GTK_ARROW_DOWN, - TRUE, - inner_x + inner_width - arrow_width, - inner_y + (inner_height - arrow_height) / 2, - arrow_width, arrow_height); - - inner_width -= arrow_width + HEADER_PADDING; + if (!ecol->is_pixbuf) + inner_width -= arrow_width + HEADER_PADDING; break; - } - default: g_return_if_reached(); } @@ -465,5 +455,30 @@ e_table_header_draw_button (GdkDrawable *drawable, ETableCol *ecol, layout, ecol->text, inner_width, FALSE); } + switch (arrow) { + case E_TABLE_COL_ARROW_NONE: + break; + + case E_TABLE_COL_ARROW_UP: + case E_TABLE_COL_ARROW_DOWN: { + if (!ecol->is_pixbuf) + inner_width += arrow_width + HEADER_PADDING; + + gtk_paint_arrow (style, drawable, state, + GTK_SHADOW_NONE, NULL, widget, "header", + (arrow == E_TABLE_COL_ARROW_UP) ? GTK_ARROW_UP : GTK_ARROW_DOWN, + !ecol->is_pixbuf, + inner_x + inner_width - arrow_width, + inner_y + (inner_height - arrow_height) / 2, + arrow_width, arrow_height); + + inner_width -= arrow_width + HEADER_PADDING; + break; + } + + default: + g_return_if_reached (); + } + g_object_unref (layout); } |