widget: Update the font at the right place

Doing it unconditionally is not useful when the subclasses actually
using them can only ever do it in the style_updated signal. So do it in
the style_updated handler instead.
This commit is contained in:
Benjamin Otte 2011-06-04 21:13:19 +02:00
parent 0ba14bb256
commit c6285387e3

View File

@ -6495,6 +6495,8 @@ gtk_widget_real_style_updated (GtkWidget *widget)
{ {
GtkWidgetPrivate *priv = widget->priv; GtkWidgetPrivate *priv = widget->priv;
gtk_widget_update_pango_context (widget);
if (priv->style != NULL && if (priv->style != NULL &&
priv->style != gtk_widget_get_default_style ()) priv->style != gtk_widget_get_default_style ())
{ {
@ -14330,8 +14332,6 @@ style_context_changed (GtkStyleContext *context,
{ {
GtkWidget *widget = user_data; GtkWidget *widget = user_data;
gtk_widget_update_pango_context (widget);
if (gtk_widget_get_realized (widget)) if (gtk_widget_get_realized (widget))
g_signal_emit (widget, widget_signals[STYLE_UPDATED], 0); g_signal_emit (widget, widget_signals[STYLE_UPDATED], 0);
else else