aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ephy-notebook.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/ephy-notebook.c b/src/ephy-notebook.c
index 90bb08044..4e16a2f77 100644
--- a/src/ephy-notebook.c
+++ b/src/ephy-notebook.c
@@ -531,13 +531,16 @@ tab_label_style_set_cb (GtkWidget *hbox,
PangoFontMetrics *metrics;
PangoContext *context;
GtkStyleContext *style;
+ const PangoFontDescription *font_desc;
GtkWidget *button;
int char_width, h, w;
context = gtk_widget_get_pango_context (hbox);
style = gtk_widget_get_style_context (hbox);
+ gtk_style_context_get (style, GTK_STATE_FLAG_NORMAL,
+ "font", &font_desc, NULL);
metrics = pango_context_get_metrics (context,
- gtk_style_context_get_font (style, GTK_STATE_FLAG_NORMAL),
+ font_desc,
pango_context_get_language (context));
char_width = pango_font_metrics_get_approximate_digit_width (metrics);
pango_font_metrics_unref (metrics);