Commit d9664021 authored by Carlos Garnacho's avatar Carlos Garnacho

GtkWidget: Update pango context from style context's font description.

parent 1cfeeadc
......@@ -8667,12 +8667,22 @@ static void
update_pango_context (GtkWidget *widget,
PangoContext *context)
GtkWidgetPrivate *priv = widget->priv;
PangoFontDescription *font_desc;
GtkStyleContext *style_context;
style_context = gtk_widget_get_style_context (widget);
pango_context_set_font_description (context, priv->style->font_desc);
gtk_style_context_get (style_context,
gtk_widget_get_state_flags (widget),
"font", &font_desc,
pango_context_set_font_description (context, font_desc);
pango_context_set_base_dir (context,
gtk_widget_get_direction (widget) == GTK_TEXT_DIR_LTR ?
pango_font_description_free (font_desc);
static void
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment