From 38e1748df89ef0a92b050f77529cd42cea9b3caa Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Thu, 27 Jun 2013 18:23:17 +0200 Subject: [PATCH] GtkWidget: Propagate scale to GtkStyleContext --- gtk/gtkwidget.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c index c1f9bb4dab..b5844e869e 100644 --- a/gtk/gtkwidget.c +++ b/gtk/gtkwidget.c @@ -4999,6 +4999,8 @@ gtk_widget_realize (GtkWidget *widget) _gtk_widget_enable_device_events (widget); gtk_widget_update_devices_mask (widget, TRUE); + if (priv->context) + gtk_style_context_set_scale (priv->context, gtk_widget_get_scale_factor (widget)); gtk_widget_connect_frame_clock (widget, gtk_widget_get_frame_clock (widget)); @@ -15383,6 +15385,7 @@ gtk_widget_get_style_context (GtkWidget *widget) priv->context = gtk_style_context_new (); gtk_style_context_set_state (priv->context, priv->state_flags); + gtk_style_context_set_scale (priv->context, gtk_widget_get_scale_factor (widget)); screen = gtk_widget_get_screen (widget); if (screen)