aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/empathy-chat-window.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/empathy-chat-window.c b/src/empathy-chat-window.c
index 9f893dc7e..94598ad84 100644
--- a/src/empathy-chat-window.c
+++ b/src/empathy-chat-window.c
@@ -226,13 +226,17 @@ chat_tab_style_set_cb (GtkWidget *hbox,
GtkWidget *button;
int char_width, h, w;
PangoContext *context;
+ const PangoFontDescription *font_desc;
PangoFontMetrics *metrics;
button = g_object_get_data (G_OBJECT (user_data),
"chat-window-tab-close-button");
context = gtk_widget_get_pango_context (hbox);
- metrics = pango_context_get_metrics (context, gtk_widget_get_style (hbox)->font_desc,
+ font_desc = gtk_style_context_get_font (gtk_widget_get_style_context (hbox),
+ GTK_STATE_FLAG_NORMAL);
+
+ metrics = pango_context_get_metrics (context, font_desc,
pango_context_get_language (context));
char_width = pango_font_metrics_get_approximate_char_width (metrics);
pango_font_metrics_unref (metrics);