[gimp] libgimpwidgets: fix Gtk warning about wrong state for GimpChainLine.



commit 1850f69dbfb95d43c1563cd947cb5e8f151072b4
Author: Jacob Boerema <jgboerema gmail com>
Date:   Wed Jan 27 22:47:00 2021 -0500

    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.

 libgimpwidgets/gimpchainbutton.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/libgimpwidgets/gimpchainbutton.c b/libgimpwidgets/gimpchainbutton.c
index 1c4b586ebd..c2e1e0b356 100644
--- a/libgimpwidgets/gimpchainbutton.c
+++ b/libgimpwidgets/gimpchainbutton.c
@@ -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);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]