[gtk/deprecate-render: 43/43] inspector: Use gtk_widget_get_style_color




commit 812a879ec2b7506c08a179691ec15a1eaaa280f8
Author: Matthias Clasen <mclasen redhat com>
Date:   Wed Oct 12 14:52:57 2022 -0400

    inspector: Use gtk_widget_get_style_color
    
    The graph renderer in the statistics page needs
    the CSS foreground color to draw the graph. Use
    the just introduced api for it.

 gtk/inspector/graphrenderer.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
---
diff --git a/gtk/inspector/graphrenderer.c b/gtk/inspector/graphrenderer.c
index 595f82213e..0fb1f0d427 100644
--- a/gtk/inspector/graphrenderer.c
+++ b/gtk/inspector/graphrenderer.c
@@ -22,7 +22,6 @@
 #include "graphdata.h"
 
 #include "gtksnapshot.h"
-#include "deprecated/gtkstylecontext.h"
 
 enum {
   PROP_0,
@@ -131,7 +130,6 @@ graph_renderer_snapshot (GtkWidget   *widget,
                          GtkSnapshot *snapshot)
 {
   GraphRenderer *self = GRAPH_RENDERER (widget);
-  GtkStyleContext *context;
   double minimum, maximum, diff;
   double x, y, width, height;
   cairo_t *cr;
@@ -155,10 +153,7 @@ graph_renderer_snapshot (GtkWidget   *widget,
 
   diff = maximum - minimum;
 
-G_GNUC_BEGIN_IGNORE_DEPRECATIONS
-  context = gtk_widget_get_style_context (widget);
-  gtk_style_context_get_color (context, &color);
-G_GNUC_END_IGNORE_DEPRECATIONS
+  gtk_widget_get_style_color (widget, &color);
 
   cr = gtk_snapshot_append_cairo (snapshot,
                                   &GRAPHENE_RECT_INIT (


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