summaryrefslogtreecommitdiff
path: root/gtk/gtkflowbox.c
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2020-01-28 00:27:36 +0100
committerBenjamin Otte <otte@redhat.com>2020-01-28 02:58:02 +0100
commit632fab0ca702b600fde492319ab0aa2d9d3bbd08 (patch)
treecf0972443ecdf15fb833cf5be7cbbed754124153 /gtk/gtkflowbox.c
parent43339f1c1c9d4330679a92affac71df71ef5fc40 (diff)
downloadgtk+-632fab0ca702b600fde492319ab0aa2d9d3bbd08.tar.gz
stylecontext: Get rid of gtk_style_context_get()
... and replace all the calls to it with gtk_style_context_peek_property(). All the calls are hacks that need to go away btw.
Diffstat (limited to 'gtk/gtkflowbox.c')
-rw-r--r--gtk/gtkflowbox.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gtk/gtkflowbox.c b/gtk/gtkflowbox.c
index 1844943f80..9a422593dd 100644
--- a/gtk/gtkflowbox.c
+++ b/gtk/gtkflowbox.c
@@ -80,6 +80,7 @@
#include "gtkadjustment.h"
#include "gtkbindings.h"
#include "gtkcontainerprivate.h"
+#include "gtkcsscolorvalueprivate.h"
#include "gtkcssnodeprivate.h"
#include "gtkgesturedrag.h"
#include "gtkgestureclick.h"
@@ -2385,7 +2386,7 @@ gtk_flow_box_snapshot (GtkWidget *widget,
{
cairo_path_t *path;
GtkBorder border;
- GdkRGBA *border_color;
+ const GdkRGBA *border_color;
if (vertical)
path_from_vertical_line_rects (cr, (GdkRectangle *)lines->data, lines->len);
@@ -2405,13 +2406,12 @@ gtk_flow_box_snapshot (GtkWidget *widget,
cairo_append_path (cr, path);
cairo_path_destroy (path);
- gtk_style_context_get (context, "border-color", &border_color, NULL);
+ border_color = gtk_css_color_value_get_rgba (_gtk_style_context_peek_property (context, GTK_CSS_PROPERTY_BORDER_TOP_COLOR));
gtk_style_context_get_border (context, &border);
cairo_set_line_width (cr, border.left);
gdk_cairo_set_source_rgba (cr, border_color);
cairo_stroke (cr);
- gdk_rgba_free (border_color);
}
g_array_free (lines, TRUE);