mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-09 18:30:08 +00:00
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.
This commit is contained in:
parent
e77a17b227
commit
1bee1cd180
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user