From: Daniel Boles Date: Fri, 9 Jun 2023 12:02:40 +0000 (+0100) Subject: DrawingArea: Document Widget.get_color, !StyleCont X-Git-Tag: archive/raspbian/4.12.3+ds-1+rpi1~1^2^2^2~22^2~1^2~168 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=1bee1cd1808c0574eddcc4f9a428abeccdaf3c4b;p=gtk4.git DrawingArea: Document Widget.get_color, !StyleCont StyleContext is deprecated. To just get foreground colour we now have a method on Widget, so use that in this example, instead of StyleContext. --- diff --git a/gtk/gtkdrawingarea.c b/gtk/gtkdrawingarea.c index 860723dd78..b425b8ba3e 100644 --- a/gtk/gtkdrawingarea.c +++ b/gtk/gtkdrawingarea.c @@ -92,17 +92,14 @@ static guint signals[LAST_SIGNAL] = { 0, }; * gpointer data) * { * GdkRGBA color; - * GtkStyleContext *context; - * - * context = gtk_widget_get_style_context (GTK_WIDGET (area)); * * cairo_arc (cr, * width / 2.0, height / 2.0, * MIN (width, height) / 2.0, * 0, 2 * G_PI); * - * gtk_style_context_get_color (context, - * &color); + * gtk_widget_get_color (GTK_WIDGET (area), + * &color); * gdk_cairo_set_source_rgba (cr, &color); * * cairo_fill (cr);