diff --git a/gtk/gtkglarea.c b/gtk/gtkglarea.c index 2810ed0c1a..110accdcf3 100644 --- a/gtk/gtkglarea.c +++ b/gtk/gtkglarea.c @@ -29,7 +29,9 @@ #include "gtksnapshot.h" #include "gtknative.h" #include "gtkwidgetprivate.h" -#include "deprecated/gtkrender.h" +#include "gtksnapshot.h" +#include "gtkrenderlayoutprivate.h" +#include "gtkcssnodeprivate.h" #include @@ -653,19 +655,15 @@ gtk_gl_area_draw_error_screen (GtkGLArea *area, GtkGLAreaPrivate *priv = gtk_gl_area_get_instance_private (area); PangoLayout *layout; int layout_height; + GtkCssBoxes boxes; - layout = gtk_widget_create_pango_layout (GTK_WIDGET (area), - priv->error->message); + layout = gtk_widget_create_pango_layout (GTK_WIDGET (area), priv->error->message); pango_layout_set_width (layout, width * PANGO_SCALE); pango_layout_set_alignment (layout, PANGO_ALIGN_CENTER); pango_layout_get_pixel_size (layout, NULL, &layout_height); -G_GNUC_BEGIN_IGNORE_DEPRECATIONS - gtk_snapshot_render_layout (snapshot, - gtk_widget_get_style_context (GTK_WIDGET (area)), - 0, (height - layout_height) / 2, - layout); -G_GNUC_END_IGNORE_DEPRECATIONS + gtk_css_boxes_init (&boxes, GTK_WIDGET (area)); + gtk_css_style_snapshot_layout (&boxes, snapshot, 0, (height - layout_height) / 2, layout); g_object_unref (layout); }