libgimpwidgets: fix Gtk warning about wrong state for GimpChainLine.

When GIMP_DEBUG=Gtk we can get a warning like
State 0 for GimpChainLine doesn't match state 128 set via
gtk_style_context_set_state () when moving the mouse over
a chain like the one in the Scale Image Dialog.

Let's remove this warning by setting the correct flags by
calling gtk_widget_get_state_flags.
This commit is contained in:
Jacob Boerema 2021-01-27 22:47:00 -05:00
parent 4686363606
commit 1850f69dbf
1 changed files with 1 additions and 1 deletions

View File

@ -612,7 +612,7 @@ gimp_chain_line_draw (GtkWidget *widget,
cairo_set_line_width (cr, 2.0);
cairo_set_line_cap (cr, CAIRO_LINE_CAP_BUTT);
gtk_style_context_get_color (context, 0, &color);
gtk_style_context_get_color (context, gtk_widget_get_state_flags (widget), &color);
gdk_cairo_set_source_rgba (cr, &color);
cairo_stroke (cr);