print: Drop one use of private api
authorMatthias Clasen <mclasen@redhat.com>
Fri, 9 Jun 2023 12:23:09 +0000 (08:23 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Fri, 9 Jun 2023 12:23:09 +0000 (08:23 -0400)
We added public api for the foreground color
for just this case, so use it.

gtk/print/gtkprintunixdialog.c

index 36639a30972cc84ffc89cba0b2ecd947bbad6095..f39a361a1a353d505f91844285b361e7fda2ae80 100644 (file)
@@ -2583,8 +2583,7 @@ draw_page (GtkDrawingArea *da,
 
   g_object_unref (layout);
 
-  style = gtk_css_node_get_style (gtk_widget_get_css_node (widget));
-  color = *gtk_css_color_value_get_rgba (style->core->color);
+  gtk_widget_get_color (widget, &color);
 
   if (page_setup != NULL)
     {