aboutsummaryrefslogtreecommitdiffstats
path: root/widgets
diff options
context:
space:
mode:
authorCosimo Cecchi <cosimoc@gnome.org>2012-03-18 08:14:48 +0800
committerMatthew Barnes <mbarnes@redhat.com>2012-03-18 08:14:48 +0800
commit54553974cabc283b16c8e2be49ee481ac7d1bfde (patch)
tree46cad2b6c02e23d87553e8127bd73513f27c3af7 /widgets
parent52a63c4a6364b2976b217dc20899aa96cd82e630 (diff)
downloadgsoc2013-evolution-54553974cabc283b16c8e2be49ee481ac7d1bfde.tar
gsoc2013-evolution-54553974cabc283b16c8e2be49ee481ac7d1bfde.tar.gz
gsoc2013-evolution-54553974cabc283b16c8e2be49ee481ac7d1bfde.tar.bz2
gsoc2013-evolution-54553974cabc283b16c8e2be49ee481ac7d1bfde.tar.lz
gsoc2013-evolution-54553974cabc283b16c8e2be49ee481ac7d1bfde.tar.xz
gsoc2013-evolution-54553974cabc283b16c8e2be49ee481ac7d1bfde.tar.zst
gsoc2013-evolution-54553974cabc283b16c8e2be49ee481ac7d1bfde.zip
Bug 671509 (2/2) - Some small UI/theming improvements
table-header: use gtk_widget_create_pango_context() for header buttons Since we temporarily set custom style classes for the header button on the table's style context, we cannot rely on the PangoContext used by gtk_widget_create_pango_layout(), since the font values it will use are cached by GtkWidget. By creating a new PangoContext and using that to create our Pango layout, the text we render will correctly support the properties specified by the theme (such as bold column-header buttons as specified by Adwaita).
Diffstat (limited to 'widgets')
-rw-r--r--widgets/table/e-table-header-utils.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/widgets/table/e-table-header-utils.c b/widgets/table/e-table-header-utils.c
index 038a44a938..e3d4ced22c 100644
--- a/widgets/table/e-table-header-utils.c
+++ b/widgets/table/e-table-header-utils.c
@@ -131,6 +131,7 @@ e_table_header_draw_button (cairo_t *cr,
gint inner_x, inner_y;
gint inner_width, inner_height;
gint arrow_width = 0, arrow_height = 0;
+ PangoContext *pango_context;
PangoLayout *layout;
GtkStyleContext *context;
GtkBorder padding;
@@ -200,7 +201,11 @@ e_table_header_draw_button (cairo_t *cr,
return; /* nothing else fits */
}
- layout = gtk_widget_create_pango_layout (widget, ecol->text);
+ pango_context = gtk_widget_create_pango_context (widget);
+ layout = pango_layout_new (pango_context);
+ g_object_unref (pango_context);
+
+ pango_layout_set_text (layout, ecol->text, -1);
pango_layout_set_ellipsize (layout, PANGO_ELLIPSIZE_END);
/* Pixbuf or label */